question: public void compactBuffer ( ) { if ( offset != buffer . length ) { byte [ ] newBuffer = new byte [ offset ] ; System . arraycopy ( buffer , 0 , newBuffer , 0 , offset ) ; buffer = newBuffer ; } }
target:  Reallocates the buffer in order to make it exactly the size of data it contains