Class Stax2StringSource

  • All Implemented Interfaces:
    javax.xml.transform.Source

    public class Stax2StringSource
    extends Stax2BlockSource
    Simple implementation of Stax2BlockSource that encapsulates a simple String.
    • Field Detail

      • mText

        final java.lang.String mText
    • Constructor Detail

      • Stax2StringSource

        public Stax2StringSource​(java.lang.String text)
    • Method Detail

      • constructReader

        public java.io.Reader constructReader()
                                       throws java.io.IOException
        Description copied from class: Stax2Source
        This method creates a Reader via which underlying input source can be accessed. Note that caller is responsible for closing that Reader when it is done reading it.
        Specified by:
        constructReader in class Stax2BlockSource
        Throws:
        java.io.IOException
      • constructInputStream

        public java.io.InputStream constructInputStream()
                                                 throws java.io.IOException
        Description copied from class: Stax2Source
        This method creates an InputStream via which underlying input source can be accessed. Note that caller is responsible for closing that InputSource when it is done reading it
        Specified by:
        constructInputStream in class Stax2BlockSource
        Throws:
        java.io.IOException
      • getText

        public java.lang.String getText()