|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.kernel.impl.nioneo.store.Buffer
public class Buffer
Wraps a ByteBuffer and is tied to a PersistenceWindow.
Using the setOffset(int) method one can offset the buffer (within
the limits of the persistence window.
All the put and get methods of this class works
the same way as in ByteBuffer.
ByteBuffer, PersistenceWindow| Method Summary | |
|---|---|
void |
close()
|
byte |
get()
Reads and returns a byte from the underlying buffer. |
Buffer |
get(byte[] dst)
Reads byte array length bytes into the
byte array from the underlying buffer. |
Buffer |
get(char[] dst)
|
ByteBuffer |
getBuffer()
Returns the underlying byte buffer. |
int |
getInt()
Reads and returns a int from the underlying buffer. |
long |
getLong()
Reads and returns a long from the underlying buffer. |
int |
getOffset()
Returns the offset of this buffer. |
long |
getUnsignedInt()
|
long |
position()
Returns the position of the persistence window tied to this buffer. |
Buffer |
put(byte b)
Puts a byte into the underlying buffer. |
Buffer |
put(byte[] src)
Puts a byte array into the underlying buffer. |
Buffer |
put(byte[] src,
int offset,
int length)
Puts a byte array into the underlying buffer starting from
offset in the array and writing length
values. |
Buffer |
put(char[] src)
|
Buffer |
putInt(int i)
Puts a int into the underlying buffer. |
Buffer |
putLong(long l)
Puts a long into the underlying buffer. |
Buffer |
setOffset(int offset)
Sets the offset from persistence window position in the underlying byte buffer. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public long position()
public ByteBuffer getBuffer()
public Buffer setOffset(int offset)
offset - The new offset to set
public int getOffset()
public Buffer put(byte b)
byte into the underlying buffer.
b - The byte that will be written
public Buffer putInt(int i)
int into the underlying buffer.
i - The int that will be written
public Buffer putLong(long l)
long into the underlying buffer.
l - The long that will be written
public byte get()
byte from the underlying buffer.
byte value at the current position/offsetpublic int getInt()
int from the underlying buffer.
int value at the current position/offsetpublic long getUnsignedInt()
public long getLong()
long from the underlying buffer.
long value at the current position/offsetpublic Buffer put(byte[] src)
byte array into the underlying buffer.
src - The byte array that will be written
public Buffer put(char[] src)
public Buffer put(byte[] src,
int offset,
int length)
byte array into the underlying buffer starting from
offset in the array and writing length
values.
src - The byte array to write values fromoffset - The offset in the byte arraylength - The number of bytes to write
public Buffer get(byte[] dst)
byte array length bytes into the
byte array from the underlying buffer.
dst - The byte array to read values into
public Buffer get(char[] dst)
public void close()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||