Class ChunkConcatReaderPool

java.lang.Object
org.atmosphere.util.ChunkConcatReaderPool

public class ChunkConcatReaderPool extends Object
Creates a signle reader instance from a sequence of readers.
Author:
elakito
  • Constructor Details

    • ChunkConcatReaderPool

      public ChunkConcatReaderPool()
  • Method Details

    • addChunk

      public void addChunk(String key, Reader chunk, boolean continued) throws 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:
      IllegalArgumentException
    • getReader

      public Reader getReader(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)