Module jakarta.mail

Class text_xml

  • All Implemented Interfaces:
    javax.activation.DataContentHandler

    public class text_xml
    extends text_plain
    DataContentHandler for text/xml.
    Author:
    Anil Vijendran, Bill Shannon
    • Constructor Summary

      Constructors 
      Constructor Description
      text_xml()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object getData​(javax.activation.ActivationDataFlavor aFlavor, javax.activation.DataSource ds)
      Given the flavor that matched, return the appropriate type of object.
      protected javax.activation.ActivationDataFlavor[] getDataFlavors()
      Return an array of ActivationDataFlavors that we support.
      void writeTo​(java.lang.Object obj, java.lang.String mimeType, java.io.OutputStream os)
      Write the object to the output stream, using the specified MIME type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • text_xml

        public text_xml()
    • Method Detail

      • getDataFlavors

        protected javax.activation.ActivationDataFlavor[] getDataFlavors()
        Description copied from class: handler_base
        Return an array of ActivationDataFlavors that we support. Usually there will be only one.
        Overrides:
        getDataFlavors in class text_plain
        Returns:
        array of ActivationDataFlavors that we support
      • getData

        protected java.lang.Object getData​(javax.activation.ActivationDataFlavor aFlavor,
                                           javax.activation.DataSource ds)
                                    throws java.io.IOException
        Description copied from class: handler_base
        Given the flavor that matched, return the appropriate type of object. Usually there's only one flavor so just call getContent.
        Overrides:
        getData in class handler_base
        Parameters:
        aFlavor - the ActivationDataFlavor
        ds - DataSource containing the data
        Returns:
        the object
        Throws:
        java.io.IOException - for errors reading the data
      • writeTo

        public void writeTo​(java.lang.Object obj,
                            java.lang.String mimeType,
                            java.io.OutputStream os)
                     throws java.io.IOException
        Description copied from class: text_plain
        Write the object to the output stream, using the specified MIME type.
        Specified by:
        writeTo in interface javax.activation.DataContentHandler
        Overrides:
        writeTo in class text_plain
        Throws:
        java.io.IOException