hunt.net.buffer.ByteBuf

Undocumented in source.

Members

Aliases

CharSequence
alias CharSequence = string
Undocumented in source.

Classes

ByteBuf
class ByteBuf

A random and sequential accessible sequence of zero or more bytes (octets). This interface provides an abstract view for one or more primitive byte arrays ({@code byte[]}) and {@linkplain ByteBuffer NIO buffers}.

Functions

checkPositive
int checkPositive(int i, string name)

Checks that the given argument is strictly positive. If it is not, throws {@link IllegalArgumentException}. Otherwise, returns the argument.

checkPositive
long checkPositive(long i, string name)

Checks that the given argument is strictly positive. If it is not, throws {@link IllegalArgumentException}. Otherwise, returns the argument.

checkPositiveOrZero
int checkPositiveOrZero(int i, string name)

Checks that the given argument is positive or zero. If it is not , throws {@link IllegalArgumentException}. Otherwise, returns the argument.

isOutOfBounds
bool isOutOfBounds(int index, int length, int capacity)

Determine if the requested {@code index} and {@code length} will fit within {@code capacity}. @param index The starting index. @param length The length which will be utilized (starting from {@code index}). @param capacity The capacity that {@code index + length} is allowed to be within. @return {@code true} if the requested {@code index} and {@code length} will fit within {@code capacity}. {@code false} if this would result in an index out of bounds exception.

throwException
void throwException(Throwable ex)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

checkNotNull
T checkNotNull(T arg, string text)

Checks that the given argument is not null. If it is, throws {@link NullPointerException}. Otherwise, returns the argument.

Meta