public void add(final byte[] buf, final int offset, final int len) {
    segments.add(new BufferSegment(buf, offset, len));
    total_length += len;
  }
public void add ( final byte [ ] buf , final int offset , final int len ) { segments . add ( new BufferSegment ( buf , offset , len ) ) ; total_length += len ; }
Add a segment to the buffer list.

@param buf byte array
@param offset offset into buf
@param len length of segment, starting at offset