question: public void appendPacket ( Buffer otherBuffer ) { byte [ ] newBuffer = new byte [ limit - position + otherBuffer . limit ] ; System . arraycopy ( buf , position , newBuffer , 0 , remaining ( ) ) ; System . arraycopy ( otherBuffer . buf , 0 , newBuffer , limit - position , otherBuffer . limit ) ; buf = newBuffer ; limit = limit - position + otherBuffer . limit ; position = 0 ; }
target:  Add stream to bytebuffer.