question: public byte [ ] toByteArray ( ) { byte [ ] newbuf = new byte [ count ] ; System . arraycopy ( buf , 0 , newbuf , 0 , count ) ; return newbuf ; }
target:  Creates a newly allocated byte array. Its size is the current size of this output stream and the valid contents of the buffer have been copied into it.