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 ( ) ) ; }
Sets a new data segment in this PDU .