|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.ikasan.framework.util.AggregatedContentInputStream
public abstract class AggregatedContentInputStream
Abstract InputStream implementation supported by blocks of byte arrays
Subclasses of this class will incrementally supply an unknown number of content blocks in the form of byte arrays,
which will be available seamlessly to the stream
hooks exist for injecting additional content: 1) before the first block (header) 2) between each block 3) after each
block 4) after the last block (footer)
| Constructor Summary | |
|---|---|
AggregatedContentInputStream()
|
|
| Method Summary | |
|---|---|
protected byte[] |
getAfterContent()
Hook method for subclasses to inject content after each block |
protected byte[] |
getBeforeContent()
Hook method for subclasses to inject content before each block |
protected byte[] |
getFooter()
Hook method for subclasses to inject footer content after last block |
protected byte[] |
getHeader()
Hook method for subclasses to header content before first block |
protected abstract byte[] |
getNextContent()
Returns the next chunk of content |
protected abstract boolean |
hasMoreContent()
Returns true if there is more content to consume |
int |
read()
|
| Methods inherited from class java.io.InputStream |
|---|
available, close, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AggregatedContentInputStream()
| Method Detail |
|---|
public int read()
throws IOException
read in class InputStreamIOExceptionprotected byte[] getFooter()
protected byte[] getAfterContent()
protected byte[] getBeforeContent()
protected byte[] getHeader()
protected abstract byte[] getNextContent()
protected abstract boolean hasMoreContent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||