Package org.atmosphere.util
Class ChunkConcatReaderPool
- java.lang.Object
-
- org.atmosphere.util.ChunkConcatReaderPool
-
public class ChunkConcatReaderPool extends java.lang.ObjectCreates a signle reader instance from a sequence of readers.- Author:
- elakito
-
-
Constructor Summary
Constructors Constructor Description ChunkConcatReaderPool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChunk(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.ReadergetReader(java.lang.String key, boolean create)Returns the specified reader.longgetTimeout()voidsetTimeout(long timeout)
-
-
-
Method Detail
-
addChunk
public void addChunk(java.lang.String key, java.io.Reader chunk, boolean continued) throws java.lang.IllegalArgumentExceptionReturn 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)
-
-