public void toByteArray(byte[] toBuf,int offset){
  int toLen=(toBuf.length > count) ? count : toBuf.length;
  System.arraycopy(buf,offset,toBuf,offset,toLen - offset);
}

public void toByteArray ( byte [ ] toBuf , int offset ) { int toLen = ( toBuf . length > count ) ? count : toBuf . length ; System . arraycopy ( buf , offset , toBuf , offset , toLen - offset ) ; }
copy the buffered data to the given array .
