net.ty.buffer

Utility functions to build fixed size buffers. These functions hold onto data and yield when a specific size has been reached.

augment-composite

(augment-composite cb buf)(augment-composite cb inc-index buf)

buffer

(buffer)(buffer init)(buffer init max)

buffer?

(buffer? x)

Bufferizable

protocol

members

as-buffer

(as-buffer this)

byte-length

(byte-length bytes)

Figure out how

capacity

(capacity buf)

component

(component cb i)

component-count

(component-count cb)

component-iterator

(component-iterator cb)

components

(components cb)

composite

(composite)(composite max)

composite-of

(composite-of & parts)

composite?

(composite? buf)

consolidate

(consolidate cb)

copy

(copy buf)

direct-buffer

(direct-buffer)(direct-buffer init)(direct-buffer init max)

duplicate

(duplicate buf)

empty-buffer

An empty bytebuffer

empty-buffer?

(empty-buffer? buf)

ensure-released

(ensure-released buf)

exhausted?

(exhausted? buf)

index-of

(index-of buf b)(index-of buf from to b)

Look for the first index of the byte b in a ByteBuf return it or nil

is-direct?

(is-direct? buf)

mark-reader-index

(mark-reader-index buf)

merge-bufs

(merge-bufs buffers)

nio-buffer

(nio-buffer buf)

read-byte

(read-byte buf)

read-bytes

(read-bytes buf ba)

read-char

(read-char buf)

read-digest

(read-digest buf)

read-int

(read-int buf)

Fetch an integer from a ByteBuf. Host endianness.

read-long

(read-long buf)

Fetch a long from a ByteBuf. Host endianness.

read-retained-slice

(read-retained-slice src)(read-retained-slice src length)

read-short

(read-short buf)

Fetch a short from a ByteBuf. Host endianness.

read-slice

(read-slice src)(read-slice src length)

read-ubyte

(read-ubyte buf)

read-uint

(read-uint buf)

read-ulong

(read-ulong buf)

read-ushort

(read-ushort buf)

readable-bytes

(readable-bytes buf)

reader-index

(reader-index buf)

refcount

(refcount buf)

refcounts

(refcounts buf)

release

(release buf)

release-all

(release-all buf)

reset-reader-index

(reset-reader-index buf)

retain

(retain buf)(retain buf incr)

retain-all

(retain-all buf)

retain-augment

(retain-augment cb buf)

retain-last

(retain-last buf)

retained-slice

(retained-slice src)(retained-slice src length)(retained-slice src index length)

ro-view

(ro-view buf)

skip-bytes

(skip-bytes buf)(skip-bytes buf len)

slice

(slice src)(slice src length)(slice src index length)

sliced-string

to-bytes

(to-bytes buf)

to-string

(to-string buf release?)(to-string buf)

touch

(touch buf)

unwrap

(unwrap buf)

wrapped-bytes

(wrapped-bytes ba)

wrapped-string

(wrapped-string s)

write-and-skip-bytes

(write-and-skip-bytes dst src)(write-and-skip-bytes dst src len)

write-byte-range

(write-byte-range buf bytes index length)

Push the specified range of contents of a byte array to a ByteBuf

write-bytes

(write-bytes dst bytes)(write-bytes dst ba idx len)

write-string

(write-string buf s)

write-uint

(write-uint buf i)

Push an int to a bytebuf, we keep host endianness over the network for optimization reasons

write-ulong

(write-ulong buf l)

Push a long to a bytebuf, we keep host endianness over the network for optimization reasons

write-ushort

(write-ushort buf i)

Push a short to a bytebuf, we keep host endianness over the network for optimization reasons

writer-index

(writer-index buf)

wrong-byte-arg

(wrong-byte-arg b)

Build an illegal argument exception