public HeapDataOutputStream(byte[] bytes){
  int len=bytes.length;
  if (len <= 0) {
    throw new IllegalArgumentException("The byte array must not be empty");
  }
  if (len > 32) {
    this.MIN_CHUNK_SIZE=len;
  }
 else {
    this.MIN_CHUNK_SIZE=32;
  }
  this.buffer=ByteBuffer.wrap(bytes);
  this.doNotCopy=false;
}

public HeapDataOutputStream ( byte [ ] bytes ) { int len = bytes . length ; if ( len <= 0 ) { throw new IllegalArgumentException ( "The byte array must not be empty" ) ; } if ( len > 32 ) { this . MIN_CHUNK_SIZE = len ; } else { this . MIN_CHUNK_SIZE = 32 ; } this . buffer = ByteBuffer . wrap ( bytes ) ; this . doNotCopy = false ; }
construct a heapdataoutputstream which uses the byte array provided as its underlying bytebuffer
