code: public final void setDataSegment (final IDataSegmentChunk chunk) {
  
          if (chunk == null) { throw new NullPointerException(); }
  
          dataSegment = ByteBuffer.allocate(chunk.getTotalLength());
          dataSegment.put(chunk.getData());
          basicHeaderSegment.setDataSegmentLength(chunk.getLength());
      }
docs: Sets a new data segment in this PDU.
  
  @param chunk The new data segment of this <code>ProtocolDataUnit</code> object.