public byte[] toArray(){
  return (Arrays.copyOf(buffer,position));
}

public byte [ ] toArray ( ) { return ( Arrays . copyOf ( buffer , position ) ) ; }
return a copy of the internal array , sized to the exact number of actual bytes .
