This class is used to represent a chunk of bytes, and
utilities to manipulate byte[].
The buffer can be modified and used for both input and output.
There are 2 modes: The chunk can be associated with a sink - ByteInputChannel or ByteOutputChannel,
which will be used when the buffer is empty ( on input ) or filled ( on output ).
For output, it can also grow. This operating mode is selected by calling setLimit() or
allocate(initial, limit) with limit != -1.
Various search and append method are defined - similar with String and StringBuffer, but
operating on bytes.
This is important because it allows processing the http headers directly on the received bytes,
without converting to chars and Strings until the strings are needed. In addition, the charset
is determined later, from headers or user code.

getCharset

getBytes

getBuffer

getStart

Returns the start offset of the bytes.
For output this is the end of the buffer.

getOffset

public int getOffset()

setOffset

public void setOffset(int off)

getLength

public int getLength()

Returns the length of the bytes.
XXX need to clean this up

setLimit

public void setLimit(int limit)

Maximum amount of data in this buffer.
If -1 or not set, the buffer will grow undefinitely.
Can be smaller than the current buffer size ( which will not shrink ).
When the limit is reached, the buffer will be flushed ( if out is set )
or throw exception.