public byte [ ] getLastSegment ( ) { if ( segments . isEmpty ( ) ) { return null ; } BufferSegment seg = segments . get ( segments . size ( ) - 1 ) ; return Arrays . copyOfRange ( seg . buf , seg . offset , seg . offset + seg . len ) ; }
Get the most recently added segment .