public class ByteArrayBuffer extends java.lang.Object implements ReadWriteBuffer
| Constructor and Description |
|---|
ByteArrayBuffer(byte[] buffer) |
ByteArrayBuffer(int length) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte[] bytes) |
protected boolean |
canWritePersistentBase() |
boolean |
checkXBytes() |
void |
checkXBytes(boolean flag) |
boolean |
containsTheSame(ByteArrayBuffer other) |
void |
copyTo(ByteArrayBuffer to,
int fromOffset,
int toOffset,
int length) |
void |
ensureSize(int size) |
boolean |
eof() |
void |
incrementIntSize() |
void |
incrementOffset(int a_by) |
int |
length() |
int |
offset()
returns the current offset in the buffer
|
void |
read(ObjectContainerBase stream,
int address,
int addressOffset)
non-encrypted read, used for indexes
|
void |
readBegin(byte identifier) |
BitMap4 |
readBitMap(int bitCount) |
byte |
readByte()
reads a byte from the buffer.
|
void |
readBytes(byte[] bytes)
reads an array of bytes from the buffer.
|
byte[] |
readBytes(int a_length) |
ByteArrayBuffer |
readEmbeddedObject(Transaction trans) |
void |
readEncrypt(ObjectContainerBase stream,
int address) |
void |
readEnd() |
int |
readInt()
reads an int from the buffer.
|
long |
readLong()
reads a long from the buffer.
|
ByteArrayBuffer |
readPayloadReader(int offset,
int length) |
int |
remainingByteCount() |
void |
seek(int offset)
positions the read pointer at the specified position
|
void |
skip(int length) |
java.lang.String |
toString() |
void |
writeBegin(byte a_identifier) |
void |
writeBitMap(BitMap4 nullBitMap) |
void |
writeByte(byte a_byte)
writes a single byte to the buffer.
|
void |
writeBytes(byte[] bytes)
writes an array of bytes to the buffer
|
void |
writeEnd() |
void |
writeIDOf(Transaction trans,
java.lang.Object obj) |
void |
writeIDOf(Transaction trans,
PersistentBase persistent) |
void |
writeInt(int a_int)
writes an int to the buffer.
|
void |
writeLong(long l)
writes a long to the buffer
|
void |
writeShortString(Transaction trans,
java.lang.String a_string) |
public ByteArrayBuffer(int length)
public ByteArrayBuffer(byte[] buffer)
public void seek(int offset)
ReadBufferseek in interface ReadBufferoffset - the desired position in the bufferpublic void writeBytes(byte[] bytes)
WriteBufferwriteBytes in interface WriteBufferbytes - the byte arraypublic void append(byte[] bytes)
public final boolean containsTheSame(ByteArrayBuffer other)
public void copyTo(ByteArrayBuffer to, int fromOffset, int toOffset, int length)
public int length()
length in interface ReadWriteBufferpublic void incrementOffset(int a_by)
incrementOffset in interface ReadWriteBufferpublic void read(ObjectContainerBase stream, int address, int addressOffset)
public final void readBegin(byte identifier)
readBegin in interface ReadWriteBufferpublic BitMap4 readBitMap(int bitCount)
readBitMap in interface ReadBufferpublic byte readByte()
ReadBufferreadByte in interface ReadBufferpublic byte[] readBytes(int a_length)
public void readBytes(byte[] bytes)
ReadBufferreadBytes in interface ReadBufferbytes - the byte array to read the bytes into.public final ByteArrayBuffer readEmbeddedObject(Transaction trans) throws Db4oIOException
Db4oIOExceptionpublic void readEncrypt(ObjectContainerBase stream, int address) throws Db4oIOException
Db4oIOExceptionpublic void readEnd()
readEnd in interface ReadWriteBufferpublic final int readInt()
ReadBufferreadInt in interface ReadBufferpublic long readLong()
ReadBufferreadLong in interface ReadBufferpublic ByteArrayBuffer readPayloadReader(int offset, int length)
public java.lang.String toString()
toString in class java.lang.Objectpublic void writeBegin(byte a_identifier)
public final void writeBitMap(BitMap4 nullBitMap)
public final void writeByte(byte a_byte)
WriteBufferwriteByte in interface WriteBuffera_byte - the bytepublic void writeEnd()
public final void writeInt(int a_int)
WriteBufferwriteInt in interface WriteBuffera_int - the intpublic void writeIDOf(Transaction trans, java.lang.Object obj)
public void writeIDOf(Transaction trans, PersistentBase persistent)
protected boolean canWritePersistentBase()
public void writeShortString(Transaction trans, java.lang.String a_string)
public void writeLong(long l)
WriteBufferwriteLong in interface WriteBufferl - the longpublic void incrementIntSize()
incrementIntSize in interface ReadWriteBufferpublic int offset()
ReadBufferoffset in interface ReadBufferpublic void ensureSize(int size)
public void skip(int length)
public void checkXBytes(boolean flag)
public boolean checkXBytes()
public boolean eof()
public int remainingByteCount()