public class ChunkedOutput extends Object implements PackOutput, BoltResponseMessageBoundaryHook
PackStream which breaks the data into a continuous stream of chunks before pushing them into a netty
channel.| Modifier and Type | Field and Description |
|---|---|
static int |
CHUNK_HEADER_SIZE |
static int |
MESSAGE_BOUNDARY |
| Constructor and Description |
|---|
ChunkedOutput(io.netty.channel.Channel ch,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
PackOutput |
flush()
If implementation has been buffering data, it should flush those buffers now.
|
void |
onMessageComplete() |
PackOutput |
writeByte(byte value)
Produce a single byte
|
PackOutput |
writeBytes(byte[] data,
int offset,
int length)
Produce binary data
|
PackOutput |
writeBytes(ByteBuffer data)
Produce binary data
|
PackOutput |
writeDouble(double value)
Produce an 8-byte IEEE 754 "double format" floating-point number
|
PackOutput |
writeInt(int value)
Produce a 4-byte signed integer
|
PackOutput |
writeLong(long value)
Produce an 8-byte signed integer
|
PackOutput |
writeShort(short value)
Produce a 4-byte signed integer
|
public static final int CHUNK_HEADER_SIZE
public static final int MESSAGE_BOUNDARY
public PackOutput flush() throws IOException
PackOutputflush in interface PackOutputIOExceptionpublic PackOutput writeByte(byte value) throws IOException
PackOutputwriteByte in interface PackOutputIOExceptionpublic PackOutput writeShort(short value) throws IOException
PackOutputwriteShort in interface PackOutputIOExceptionpublic PackOutput writeInt(int value) throws IOException
PackOutputwriteInt in interface PackOutputIOExceptionpublic PackOutput writeLong(long value) throws IOException
PackOutputwriteLong in interface PackOutputIOExceptionpublic PackOutput writeDouble(double value) throws IOException
PackOutputwriteDouble in interface PackOutputIOExceptionpublic PackOutput writeBytes(ByteBuffer data) throws IOException
PackOutputwriteBytes in interface PackOutputIOExceptionpublic PackOutput writeBytes(byte[] data, int offset, int length) throws IOException
PackOutputwriteBytes in interface PackOutputIOExceptionpublic void close()
public void onMessageComplete()
throws IOException
onMessageComplete in interface BoltResponseMessageBoundaryHookIOExceptionCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.