Class ChunkConcatReaderPool


  • public class ChunkConcatReaderPool
    extends java.lang.Object
    Creates a signle reader instance from a sequence of readers.
    Author:
    elakito
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addChunk​(java.lang.String key, java.io.Reader chunk, boolean continued)
      Return a reader if the reader specified by the key has not been previously created.
      java.io.Reader getReader​(java.lang.String key, boolean create)
      Returns the specified reader.
      long getTimeout()  
      void setTimeout​(long timeout)  
      • Methods inherited from class java.lang.Object

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

      • ChunkConcatReaderPool

        public ChunkConcatReaderPool()
    • Method Detail

      • addChunk

        public void addChunk​(java.lang.String key,
                             java.io.Reader chunk,
                             boolean continued)
                      throws java.lang.IllegalArgumentException
        Return a reader if the reader specified by the key has not been previously created. If the reader has been created, the content is added to that reader and returns null.
        Parameters:
        key -
        chunk -
        continued -
        Throws:
        java.lang.IllegalArgumentException
      • getReader

        public java.io.Reader getReader​(java.lang.String key,
                                        boolean create)
        Returns the specified reader. If the reader is absent, returns null. If create is set to true, a new reader is created.
        Parameters:
        key -
        create -
        Returns:
      • getTimeout

        public long getTimeout()
      • setTimeout

        public void setTimeout​(long timeout)