Class RtfStreamSource

  • All Implemented Interfaces:
    IRtfSource

    public class RtfStreamSource
    extends java.lang.Object
    implements IRtfSource
    Implementation of IRtfSource which will read the RTF file from a stream.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int pushBackChar  
      private java.io.InputStream stream  
    • Constructor Summary

      Constructors 
      Constructor Description
      RtfStreamSource​(java.io.InputStream stream)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int read()
      Read a single byte.
      int read​(byte[] b)
      Read enough bytes to fill the array.
      void unread​(int c)
      Push back a single byte to allow it to be read again by the parser.
      • Methods inherited from class java.lang.Object

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

      • stream

        private final java.io.InputStream stream
      • pushBackChar

        private int pushBackChar
    • Constructor Detail

      • RtfStreamSource

        public RtfStreamSource​(java.io.InputStream stream)
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Description copied from interface: IRtfSource
        Read a single byte.
        Specified by:
        read in interface IRtfSource
        Throws:
        java.io.IOException
      • unread

        public void unread​(int c)
                    throws java.io.IOException
        Description copied from interface: IRtfSource
        Push back a single byte to allow it to be read again by the parser.
        Specified by:
        unread in interface IRtfSource
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Description copied from interface: IRtfSource
        Read enough bytes to fill the array.
        Specified by:
        read in interface IRtfSource
        Throws:
        java.io.IOException