ReleasableByteBuf mixin
- Superclass Constraints
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isReadable → bool
-
Returns true if there are any readable bytes left.
no setterinherited
- isWritable → bool
-
Returns true if there are writeable bytes left.
no setterinherited
-
listView
→ List<
int> -
no setterinherited
- maxCapacity ↔ int
-
Upper constraint of the buffer capacity.
getter/setter pairinherited
- minCapacity ↔ int
-
Lower constraint of the buffer capacity.
getter/setter pairinherited
- readableBytes → int
-
Amount of bytes which are readable from the current
readerIndex (inclusive).
no setterinherited
- readerIndex ↔ int
-
Current reader index.
getter/setter pairinherited
- readMarker ↔ int
-
The marker of the readerIndex. Overrides the readerIndex
with its value when resetReaderIndex is called.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- writableBytes → int
-
Amount of free bytes inside the buffer from the
current writerIndex (inclusive).
no setterinherited
- writeMarker ↔ int
-
The marker of the writerIndex. Overrides the writerIndex
with its value when resetWriterIndex is called.
getter/setter pairinherited
- writerIndex ↔ int
-
Current writer index.
getter/setter pairinherited
Methods
-
allocate(
int bytes) → void -
Allocates/Grows the buffer by
bytes
inside its own constraints.inherited -
array(
) → Uint8List -
Copies the whole buffer to a separate Uint8List.
inherited
-
assertReadable(
int index, int length) → void -
Asserts the writability of the region.
inherited
-
assertWriteable(
int index, int length) → void -
Asserts the readability of the region.
inherited
-
capacity(
) → int -
Current capacity of the buffer
inherited
-
checkReadable(
int index, int length) → bool -
Checks the readability of the region while not taking buffer growth
into account. Doesn't throw exceptions.
inherited
-
checkWriteable(
int index, int length) → bool -
Checks the writability of the region while not taking buffer growth
into account. Doesn't throw exceptions.
inherited
-
clear(
) → void -
Sets both readerIndex and writerIndex to 0.
inherited
-
createReadMarker(
) → LinkedReadMarker -
Creates a read marker which doesn't depend on the buffers own markers.
inherited
-
createWriteMarker(
) → LinkedWriteMarker -
Creates a write marker which doesn't depend on the buffers own markers.
inherited
-
discardReadBytes(
) → int -
Discards all already read bytes and shifts all contents to the left,
so that readerIndex is 0 again. The writerIndex gets decreased by
the amount of bytes freed.
inherited
-
ensureWritable(
int minWritableBytes) → int -
Tries to expand the buffer to fit at least
minWritableBytes
and returns the amount of bytes which were allocated.inherited -
getBuffer(
int index, int length) → ByteBuf -
Returns a ByteBuf viewing a region beginning at
index
with the length oflength
.inherited -
getByte(
int index) → int -
Gets the byte at
index
.inherited -
getByteData(
int index, int length) → ByteData -
Reads
length
bytes beginning atindex
(inclusive) as a native ByteData view.inherited -
getBytes(
int index, int length) → Uint8List -
Reads
length
bytes beginning atindex
(inclusive) into a Uint8List.inherited -
isGrowable(
) → bool -
Defines if the buffer can expand its capacity
insides its own constraints.
inherited
-
isReleased(
) → bool - Whether the buffer has been released.
-
markReaderIndex(
) → void -
Sets the readMarker to readerIndex.
inherited
-
markWriterIndex(
) → void -
Sets the writeMarker to writerIndex.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
peekAvailableBytes(
) → Uint8List -
Reads all available bytes into a Uint8List without incrementing
the reader index.
inherited
-
readAvailableBytes(
) → Uint8List -
Reads all available bytes into a Uint8List.
inherited
-
readBuffer(
int length) → ByteBuf -
Returns a ByteBuf viewing a region beginning at readerIndex
with the length of
length
.inherited -
readByte(
) → int -
Reads the byte at the readerIndex and increments
the readerIndex by 1 afterwards.
inherited
-
readByteData(
int length) → ByteData -
Reads
length
bytes beginning at readerIndex (inclusive) as a native ByteData view and increments readerIndex bylength
afterwards.inherited -
readBytes(
int length) → Uint8List -
Reads the next
length
bytes at the current readerIndex (inclusive) and increments the readerIndex bylength
.inherited -
release(
) → void - Releases the buffer.
-
resetReaderIndex(
) → void -
Resets the readerIndex to readMarker.
inherited
-
resetWriterIndex(
) → void -
Resets the writerIndex to writeMarker.
inherited
-
setBuffer(
int index, ByteBuf buffer) → void -
Writes the content of
buffer
atindex
(inclusive).inherited -
setByte(
int index, int byte) → void -
Sets the byte at
index
tobyte
.inherited -
setByteData(
int index, int length) → ByteData -
Returns a writeable native ByteData view of the
buffer
atindex
(inclusive) with an length oflength
.inherited -
setBytes(
int index, List< int> bytes) → void -
Writes the content of
bytes
atindex
(inclusive).inherited -
setReleasedInternal(
bool released) → void - Sets the released state of the buffer.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateByte(
int index, int byte) → void -
Sets the byte at
index
tobyte
.inherited -
viewBuffer(
int index, int length) → ByteBuf -
Returns a ByteBuf viewing a region beginning at
index
with the length oflength
.inherited -
viewByteData(
int index, int length) → ByteData -
Creates a native ByteData view at
index
with the length oflength
.inherited -
writeBuffer(
ByteBuf buffer) → void -
Writes the content of
buffer
at the current writerIndex (inclusive) and increments the writerIndex by the length of thebuffer
.inherited -
writeByte(
int byte) → void -
Write one byte with the value of
byte
at the writerIndex and increments the writerIndex by 1 afterwards.inherited -
writeByteData(
int length) → ByteData -
Returns a
length
-long native ByteData view beginning at readerIndex (inclusive) and increments the writerIndex bylength
.inherited -
writeBytes(
List< int> bytes) → void -
Writes the
bytes
at the current writerIndex (inclusive) and increments the writerIndex by the length of the added bytes.inherited -
writeTransactionBuffer(
int length) → ByteBuf -
Gets a
length
-long writable transaction buffer at the current writerIndex (inclusive) and increments the writerIndex bylength
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → int -
Gets the byte at
index
.inherited -
operator []=(
int index, int value) → void -
Sets the byte at
index
tovalue
.inherited