public abstract class StreamProcessor
extends java.lang.Object
processContents(String)
is called once with the streams contents read as a string.
If the stream is a instance of ZipInputStream
, then processContents(String)
is
called with the contents of each file within the zip stream.Constructor and Description |
---|
StreamProcessor(java.lang.String cacheKey)
The constructor
|
StreamProcessor(java.lang.String cacheKey,
java.lang.String forcedContentType)
The constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract Stream |
getStream() |
void |
handleStream()
Called to process the stream.
|
abstract void |
processContents(java.lang.String contents)
This method is called each time a streams contents are read.
|
public StreamProcessor(java.lang.String cacheKey, java.lang.String forcedContentType)
cacheKey
- The cached key associated with this streamforcedContentType
- Used to override the content type, null to use the defaultpublic StreamProcessor(java.lang.String cacheKey)
cacheKey
- The cached key associated with this streamprotected abstract Stream getStream() throws ExtensionException, java.io.IOException
ExtensionException
java.io.IOException
public void handleStream() throws SourceException
processContents(String)
to be
called.SourceException
- Thrown in their are any problemspublic abstract void processContents(java.lang.String contents) throws SourceException
ZipInputStream
, then it is called for each of the files within the zip
stream.contents
- The contents of the stream as a stringSourceException
- Thrown in their are any problems