Class StringReadingListener

    • Constructor Detail

      • StringReadingListener

        public StringReadingListener​(Representation source)
                              throws java.io.IOException
        Default constructor. Uses a byte buffer of IoUtils.BUFFER_SIZE length.
        Parameters:
        source - The source representation.
        Throws:
        java.io.IOException
      • StringReadingListener

        public StringReadingListener​(Representation source,
                                     int bufferSize)
                              throws java.io.IOException
        Constructor. Uses a byte buffer of a given size.
        Parameters:
        source - The source representation.
        bufferSize - The byte buffer to use.
        Throws:
        java.io.IOException
    • Method Detail

      • onContent

        protected final void onContent​(java.io.Reader reader)
        Description copied from class: CharacterReadingListener
        Callback invoked when new content is available.
        Specified by:
        onContent in class CharacterReadingListener
        Parameters:
        reader - The reader allowing to retrieve the new content.
      • onContent

        protected abstract void onContent​(java.lang.String content)
        Callback invoked when new content is available.
        Parameters:
        content - The new content.