|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.priha.core.binary.MemoryBinarySource
public class MemoryBinarySource
A BinarySource which stores the binary in the memory in a byte array.
Obviously, this source is limited by the size of the heap.
| Constructor Summary | |
|---|---|
MemoryBinarySource(byte[] v)
Creates a MemoryBinarySource by using the given byte array. |
|
MemoryBinarySource(java.io.InputStream in)
Creates a new MemoryBinarySource by slurping the contents into a binary array. |
|
| Method Summary | |
|---|---|
MemoryBinarySource |
clone()
Duplicates the BinarySource object. |
long |
getLength()
Return the length of the object represented by this BinarySource. |
java.io.InputStream |
getStream()
Returns the contents of the BinarySource as an InputStream. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryBinarySource(java.io.InputStream in)
throws java.io.IOException
in - The InputStream to read. If null, creates
an empty MemoryBinarySource.
java.io.IOException - If reading of the stream failed
and the memory could not be initialized.spublic MemoryBinarySource(byte[] v)
v - The byte array to use.| Method Detail |
|---|
public long getLength()
getLength in interface BinarySourcepublic java.io.InputStream getStream()
getStream in interface BinarySourcepublic MemoryBinarySource clone()
clone in interface BinarySourceclone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||