|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ados.hestia.utils.io.MemoryStore
public class MemoryStore
This realize IStore interface using memory buffer to store data.
This is fast but at unconroling usage of it will cause MemoryException
IStore
,
Serialized FormNested Class Summary | |
---|---|
class |
MemoryStore.MemoryStoreOutStream
|
Field Summary | |
---|---|
protected byte[] |
m_data
|
protected String |
m_id
|
Constructor Summary | |
---|---|
MemoryStore(String id)
|
Method Summary | |
---|---|
OutputStream |
createStream()
Create output stream to write data. |
String |
getID()
Returns id of store. |
long |
getSize()
Returns size of data at store. |
InputStream |
openSharedStream()
Open shared stream to read data. |
InputStream |
openStream()
Open ordinary stream to read data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] m_data
protected String m_id
Constructor Detail |
---|
public MemoryStore(String id)
Method Detail |
---|
public InputStream openStream() throws IOException
openStream
in interface IStore
IOException
- if stream can not be openedpublic InputStream openSharedStream() throws IOException
openSharedStream
in interface IStore
IOException
- if stream can not be openedpublic OutputStream createStream() throws IOException
createStream
in interface IStore
IOException
- if stream can not be openedpublic long getSize()
getSize
in interface IStore
public String getID()
getID
in interface IStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |