| Package | Description |
|---|---|
| io.pkts.buffer |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractBuffer |
class |
BaseBuffer
Abstract abstract buffer :-)
|
class |
BoundedInputStreamBuffer |
class |
ByteBuffer
A buffer directly backed by a byte-array
|
class |
EmptyBuffer
Represents an empty buffer.
|
class |
InputStreamBuffer |
| Modifier and Type | Field and Description |
|---|---|
static Buffer |
Buffers.EMPTY_BUFFER
An empty buffer.
|
| Modifier and Type | Method and Description |
|---|---|
Buffer |
BoundedInputStreamBuffer.clone() |
abstract Buffer |
BaseBuffer.clone() |
Buffer |
InputStreamBuffer.clone() |
abstract Buffer |
AbstractBuffer.clone() |
Buffer |
EmptyBuffer.clone()
Really nothing to clone so just return this since this
EmptyBuffer is by definition immutable. |
Buffer |
Buffer.clone()
Performs a deep clone of this object.
|
Buffer |
ByteBuffer.clone()
Performs a deep clone of this object.
|
static Buffer |
Buffers.createBuffer(int capacity)
Create a new Buffer
|
Buffer |
BoundedInputStreamBuffer.readBytes(int length)
Read the requested number of bytes and increase the readerIndex with the
corresponding number of bytes.
|
Buffer |
InputStreamBuffer.readBytes(int length)
Read the requested number of bytes and increase the readerIndex with the
corresponding number of bytes.
|
Buffer |
EmptyBuffer.readBytes(int length)
Read the requested number of bytes and increase the readerIndex with the
corresponding number of bytes.
|
Buffer |
Buffer.readBytes(int length)
Read the requested number of bytes and increase the readerIndex with the
corresponding number of bytes.
|
Buffer |
ByteBuffer.readBytes(int length)
Read the requested number of bytes and increase the readerIndex with the
corresponding number of bytes.
|
Buffer |
BaseBuffer.readLine()
Reads a line, i.e., it reads until we hit a line feed ('\n') or a
carriage return ('\r'), or a carriage return followed immediately by a
line feed.
|
Buffer |
EmptyBuffer.readLine()
Reads a line, i.e., it reads until we hit a line feed ('\n') or a
carriage return ('\r'), or a carriage return followed immediately by a
line feed.
|
Buffer |
Buffer.readLine()
Reads a line, i.e., it reads until we hit a line feed ('\n') or a
carriage return ('\r'), or a carriage return followed immediately by a
line feed.
|
Buffer |
BaseBuffer.readUntil(byte b)
Same as
#readUntil(4096, 'b')
Read until the specified byte is encountered and return a buffer
representing that section of the buffer. |
Buffer |
EmptyBuffer.readUntil(byte b)
Same as
#readUntil(4096, 'b')
Read until the specified byte is encountered and return a buffer
representing that section of the buffer. |
Buffer |
Buffer.readUntil(byte b)
Same as
#readUntil(4096, 'b')
Read until the specified byte is encountered and return a buffer
representing that section of the buffer. |
Buffer |
BaseBuffer.readUntil(int maxBytes,
byte... bytes)
Read until any of the specified bytes have been encountered or until we
have read a maximum amount of bytes.
|
Buffer |
EmptyBuffer.readUntil(int maxBytes,
byte... bytes) |
Buffer |
Buffer.readUntil(int maxBytes,
byte... bytes)
Read until any of the specified bytes have been encountered or until we
have read a maximum amount of bytes.
|
Buffer |
BaseBuffer.readUntilDoubleCRLF() |
Buffer |
EmptyBuffer.readUntilDoubleCRLF() |
Buffer |
Buffer.readUntilDoubleCRLF()
Read until we find a double CRLF.
|
Buffer |
BaseBuffer.readUntilSafe(int maxBytes,
byte... bytes)
Same as
readUntil(int, byte...) but will return null instead of
throwing a ByteNotFoundException |
Buffer |
EmptyBuffer.readUntilSafe(int maxBytes,
byte... bytes) |
Buffer |
Buffer.readUntilSafe(int maxBytes,
byte... bytes)
Same as
readUntil(int, byte...) but will return null instead of
throwing a ByteNotFoundException |
Buffer |
BaseBuffer.readUntilSingleCRLF()
Read until we find a single CRLF.
|
Buffer |
EmptyBuffer.readUntilSingleCRLF() |
Buffer |
Buffer.readUntilSingleCRLF()
Read until we find a single CRLF.
|
Buffer |
BoundedInputStreamBuffer.slice() |
Buffer |
AbstractBuffer.slice() |
Buffer |
EmptyBuffer.slice()
Slice off the rest of the buffer.
|
Buffer |
Buffer.slice()
Slice off the rest of the buffer.
|
Buffer |
BoundedInputStreamBuffer.slice(int stop) |
Buffer |
AbstractBuffer.slice(int stop)
Same as
#slice(Buffer.getReaderIndex(), int) |
Buffer |
EmptyBuffer.slice(int stop)
Same as
#slice(Buffer.getReaderIndex(), int) |
Buffer |
Buffer.slice(int stop)
Same as
#slice(Buffer.getReaderIndex(), int) |
Buffer |
BoundedInputStreamBuffer.slice(int start,
int stop)
Get a slice of the buffer starting at
start (inclusive)
ending at stop (exclusive). |
Buffer |
InputStreamBuffer.slice(int start,
int stop)
Get a slice of the buffer starting at
start (inclusive)
ending at stop (exclusive). |
Buffer |
EmptyBuffer.slice(int start,
int stop)
Get a slice of the buffer starting at
start (inclusive)
ending at stop (exclusive). |
Buffer |
Buffer.slice(int start,
int stop)
Get a slice of the buffer starting at
start (inclusive)
ending at stop (exclusive). |
Buffer |
ByteBuffer.slice(int start,
int stop)
Get a slice of the buffer starting at
start (inclusive)
ending at stop (exclusive). |
static Buffer |
Buffers.wrap(Buffer one,
Buffer two)
Combine two buffers into one.
|
static Buffer |
Buffers.wrap(byte[] buffer)
Wrap the supplied byte array
|
static Buffer |
Buffers.wrap(byte[] buffer,
int lowerBoundary,
int upperBoundary)
Wrap the supplied byte array specifying the allowed range of visible
bytes.
|
static Buffer |
Buffers.wrap(InputStream is) |
static Buffer |
Buffers.wrap(int value)
Converts the integer value into a string and that is what is being
wrapped in a
Buffer |
static Buffer |
Buffers.wrap(long value) |
static Buffer |
Buffers.wrap(String s) |
static Buffer |
Buffers.wrapAndClone(byte[] buffer)
Same as
Buffers.wrap(byte[]) but we will clone the byte array first. |
| Modifier and Type | Method and Description |
|---|---|
static void |
Buffers.assertNotEmpty(Buffer buffer) |
static void |
Buffers.assertNotEmpty(Buffer buffer,
String msg) |
void |
BoundedInputStreamBuffer.getBytes(Buffer dst) |
void |
InputStreamBuffer.getBytes(Buffer dst) |
void |
EmptyBuffer.getBytes(Buffer dst) |
void |
Buffer.getBytes(Buffer dst)
Same as calling
getBytes(int, Buffer) where the index is
getReaderIndex(). |
void |
ByteBuffer.getBytes(Buffer dst) |
void |
BoundedInputStreamBuffer.getBytes(int index,
Buffer dst) |
void |
InputStreamBuffer.getBytes(int index,
Buffer dst) |
void |
EmptyBuffer.getBytes(int index,
Buffer dst) |
void |
Buffer.getBytes(int index,
Buffer dst)
Transfer this buffer's data to the destination buffer.
|
void |
ByteBuffer.getBytes(int index,
Buffer dst) |
static Buffer |
Buffers.wrap(Buffer one,
Buffer two)
Combine two buffers into one.
|
Copyright © 2021. All Rights Reserved.