Implementers
Available Extensions
Methods
allocate (int bytes )
→ void
Allocates/Grows the buffer by bytes
inside
its own constraints.
array ()
→ Uint8List
Copies the whole buffer to a separate Uint8List .
assertReadable (int index , int length )
→ void
Asserts the writability of the region.
assertWriteable (int index , int length )
→ void
Asserts the readability of the region.
capacity ()
→ int
Current capacity of the buffer
checkReadable (int index , int length )
→ bool
Checks the readability of the region while not taking buffer growth
into account. Doesn't throw exceptions.
checkWriteable (int index , int length )
→ bool
Checks the writability of the region while not taking buffer growth
into account. Doesn't throw exceptions.
clear ()
→ void
Sets both readerIndex and writerIndex to 0.
createReadMarker ()
→ LinkedReadMarker
Creates a read marker which doesn't depend on the buffers own markers.
createWriteMarker ()
→ LinkedWriteMarker
Creates a write marker which doesn't depend on the buffers own markers.
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.
ensureWritable (int minWritableBytes )
→ int
Tries to expand the buffer to fit at least minWritableBytes
and
returns the amount of bytes which were allocated.
getBuffer (int index , int length )
→ ByteBuf
Returns a ByteBuf viewing a region beginning at index
with
the length of length
.
getByte (int index )
→ int
Gets the byte at index
.
getByteData (int index , int length )
→ ByteData
Reads length
bytes beginning at index
(inclusive) as
a native ByteData view.
getBytes (int index , int length )
→ Uint8List
Reads length
bytes beginning at index
(inclusive) into
a Uint8List .
isGrowable ()
→ bool
Defines if the buffer can expand its capacity
insides its own constraints.
markReaderIndex ()
→ void
Sets the readMarker to readerIndex .
markWriterIndex ()
→ void
Sets the writeMarker to writerIndex .
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.
readAvailableBytes ()
→ Uint8List
Reads all available bytes into a Uint8List .
readBuffer (int length )
→ ByteBuf
Returns a ByteBuf viewing a region beginning at readerIndex
with the length of length
.
readByte ()
→ int
Reads the byte at the readerIndex and increments
the readerIndex by 1 afterwards.
readByteData (int length )
→ ByteData
Reads length
bytes beginning at readerIndex (inclusive) as
a native ByteData view and increments readerIndex by length
afterwards.
readBytes (int length )
→ Uint8List
Reads the next length
bytes at the current readerIndex (inclusive) and
increments the readerIndex by length
.
resetReaderIndex ()
→ void
Resets the readerIndex to readMarker .
resetWriterIndex ()
→ void
Resets the writerIndex to writeMarker .
setBuffer (int index , ByteBuf buffer )
→ void
Writes the content of buffer
at index
(inclusive).
setByte (int index , int byte )
→ void
Sets the byte at index
to byte
.
setByteData (int index , int length )
→ ByteData
Returns a writeable native ByteData view of the buffer
at index
(inclusive) with an length of length
.
setBytes (int index , List <int > bytes )
→ void
Writes the content of bytes
at index
(inclusive).
toString ()
→ String
A string representation of this object.
inherited
updateByte (int index , int byte )
→ void
Sets the byte at index
to byte
.
viewBuffer (int index , int length )
→ ByteBuf
Returns a ByteBuf viewing a region beginning at index
with
the length of length
.
viewByteData (int index , int length )
→ ByteData
Creates a native ByteData view at index
with
the length of length
.
writeBuffer (ByteBuf buffer )
→ void
Writes the content of buffer
at the current
writerIndex (inclusive) and increments the writerIndex by
the length of the buffer
.
writeByte (int byte )
→ void
Write one byte with the value of byte
at the
writerIndex and increments the writerIndex
by 1 afterwards.
writeByteData (int length )
→ ByteData
Returns a length
-long native ByteData view beginning at
readerIndex (inclusive) and increments the writerIndex by
length
.
writeBytes (List <int > bytes )
→ void
Writes the bytes
at the current writerIndex (inclusive)
and increments the writerIndex by the length of the added
bytes.
writeTransactionBuffer (int length )
→ ByteBuf
Gets a length
-long writable transaction buffer at the current
writerIndex (inclusive) and increments the writerIndex by length
.