|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.util.io.MemoryStreamHandler
@NotThreadSafe public final class MemoryStreamHandler
Handles resources and stores them in-memory.
Constructor Summary | |
---|---|
MemoryStreamHandler() |
Method Summary | |
---|---|
byte[] |
getData(String resourceId) Allows direct access to the data stored. |
InputStream |
openToRead(String resourceId) Opens a stream to the given resource for reading. |
OutputStream |
openToWrite(String resourceId) Opens a stream to the given resource for writing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryStreamHandler()
Method Detail |
---|
public byte[] getData(String resourceId)
resourceId
- the identifier of the resource requested.
null
if there is no data for this key.
public InputStream openToRead(String resourceId) throws IOException
openToRead
in interface
StreamHandler
resourceId
- the identifier of the resource that should be opened.
IOException
- on any problem opening the resource.
public OutputStream openToWrite(String resourceId) throws IOException
openToWrite
in interface
StreamHandler
resourceId
- the identifier of the resource that should be opened.
IOException
- on any problem opening the resource.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |