Similar to the ByteArrayOutputStream, with the exception that we can prepend an header.
e.g. you write some data and you want to prepend an header that contains the data len or cksum.
ByteSlot slot = new ByteSlot();
// write data
// write header with the size of the written data
// flush to stream as [header, data]