public class BlockLogBuffer extends Object implements Closeable
BlockLogReader.
Every chunk is exactly 256 bytes in length, except for the last one which can be anything greater than one and up to 256. This is signaled via the first byte which is 0 for every non-last chunk and the actual number of bytes for the last one (always > 0).
| Constructor and Description |
|---|
BlockLogBuffer(org.jboss.netty.buffer.ChannelBuffer target,
org.neo4j.kernel.monitoring.ByteCounterMonitor monitor) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Signals the end of use for this buffer over this channel - first byte of
the chunk is set to the position of the buffer ( != 0, instead of
FULL_BLOCK_AND_MORE) and it is written to the channel.
|
BlockLogBuffer |
put(byte b) |
BlockLogBuffer |
put(byte[] bytes,
int length) |
BlockLogBuffer |
putDouble(double d) |
BlockLogBuffer |
putFloat(float f) |
BlockLogBuffer |
putInt(int i) |
BlockLogBuffer |
putLong(long l) |
BlockLogBuffer |
putShort(short s) |
int |
write(ReadableByteChannel data) |
public BlockLogBuffer(org.jboss.netty.buffer.ChannelBuffer target,
org.neo4j.kernel.monitoring.ByteCounterMonitor monitor)
public BlockLogBuffer put(byte b) throws IOException
IOExceptionpublic BlockLogBuffer putShort(short s) throws IOException
IOExceptionpublic BlockLogBuffer putInt(int i) throws IOException
IOExceptionpublic BlockLogBuffer putLong(long l) throws IOException
IOExceptionpublic BlockLogBuffer putFloat(float f) throws IOException
IOExceptionpublic BlockLogBuffer putDouble(double d) throws IOException
IOExceptionpublic BlockLogBuffer put(byte[] bytes, int length) throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic int write(ReadableByteChannel data) throws IOException
IOExceptionCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.