bodyStream = new ExposedBaos(2048);
return bodyStream;
}
public void writeTo(EndPoint endpoint) throws IOException, Pausable {
ExposedBaos headerStream = new ExposedBaos();
writeHeader(headerStream);
ByteBuffer bb = headerStream.toByteBuffer();
endpoint.write(bb);
if (bodyStream != null && bodyStream.size() > 0) {
bb = bodyStream.toByteBuffer();
endpoint.write(bb);
}