|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.stanwood.media.source.xbmc.StreamProcessor
public abstract class StreamProcessor
This class is used to process streams that could be zipped. If the stream is not zipped, then
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 Summary | |
---|---|
StreamProcessor(java.lang.String cacheKey)
The constructor |
|
StreamProcessor(java.lang.String cacheKey,
java.lang.String forcedContentType)
The constructor |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 streamMethod Detail |
---|
protected 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 string
SourceException
- Thrown in their are any problems
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |