Class InputSource

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class InputSource
    extends java.lang.Object
    implements java.io.Closeable
    The input supported by the parser.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String media_  
      private java.io.Reader reader_  
      private java.lang.String title_  
      private java.lang.String uri_  
    • Constructor Summary

      Constructors 
      Constructor Description
      InputSource​(java.io.Reader reader)
      Create a new input source backed by a reader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.lang.String getMedia()  
      java.io.Reader getReader()  
      java.lang.String getTitle()  
      java.lang.String getURI()  
      void setMedia​(java.lang.String media)  
      void setTitle​(java.lang.String title)  
      void setURI​(java.lang.String uri)  
      • Methods inherited from class java.lang.Object

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

      • uri_

        private java.lang.String uri_
      • reader_

        private final java.io.Reader reader_
      • media_

        private java.lang.String media_
      • title_

        private java.lang.String title_
    • Constructor Detail

      • InputSource

        public InputSource​(java.io.Reader reader)
        Create a new input source backed by a reader.
        Parameters:
        reader - the reader
    • Method Detail

      • getReader

        public java.io.Reader getReader()
        Returns:
        the reader if defined
      • getURI

        public java.lang.String getURI()
        Returns:
        the uri if set
      • setURI

        public void setURI​(java.lang.String uri)
        Parameters:
        uri - the uri
      • getMedia

        public java.lang.String getMedia()
        Returns:
        the media if set
      • setMedia

        public void setMedia​(java.lang.String media)
        Parameters:
        media - the media
      • getTitle

        public java.lang.String getTitle()
        Returns:
        the title if set
      • setTitle

        public void setTitle​(java.lang.String title)
        Parameters:
        title - the title
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException