|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RandomAccessBinary
Random access binary is a interface to access a binary object (BLOB). Binary object is random accessible and has a length. It can be read and written, enlarged and shrunk at any position.
There is a pointer which moves on every read and write operation. It can
moved with position()
. If bytes are written and the pointer is
moved outside the blob or moves while writing, the blob is enlarged.
Cascading implementation
,
RandomAccessFile implementation
,
java.util.List implementation
Nested Class Summary | |
---|---|
static class |
RandomAccessBinary.ByteSide
|
Method Summary | |
---|---|
void |
close()
Flush and close the blob. |
void |
flush()
Flush write buffer |
void |
insertBytes(long bytes,
RandomAccessBinary.ByteSide side)
Insert bytes at current pointer. |
boolean |
isOpen()
Check if binary is open. |
long |
length()
Get the length of the binary object. |
long |
position()
Get the position of the cursor |
void |
position(long newPosition)
Set new cursor position. |
void |
removeBytes(long bytes,
RandomAccessBinary.ByteSide side)
Remove bytes from the position of the current pointer. |
void |
reset()
Reset internal cache. |
void |
setLength(long newLength)
Set length of the binary object. |
Methods inherited from interface org.simantics.databoard.util.binary.BinaryWriteable |
---|
writeFully, writeFully |
Methods inherited from interface java.io.DataOutput |
---|
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF |
Methods inherited from interface org.simantics.databoard.util.binary.BinaryReadable |
---|
readFully, readFully, skipBytes |
Methods inherited from interface java.io.DataInput |
---|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes |
Method Detail |
---|
void flush() throws java.io.IOException
flush
in interface BinaryWriteable
java.io.IOException
void reset() throws java.io.IOException
java.io.IOException
void removeBytes(long bytes, RandomAccessBinary.ByteSide side) throws java.io.IOException
bytes
- side
-
java.io.IOException
void insertBytes(long bytes, RandomAccessBinary.ByteSide side) throws java.io.IOException
bytes
- side
-
java.io.IOException
void setLength(long newLength) throws java.io.IOException
newLength
-
java.io.IOException
long length() throws java.io.IOException
length
in interface BinaryReadable
java.io.IOException
void close() throws java.io.IOException
java.io.IOException
boolean isOpen()
void position(long newPosition) throws java.io.IOException
newPosition
-
java.io.IOException
long position() throws java.io.IOException
position
in interface BinaryReadable
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |