public void ensureCapacity(int minimumCapacity){
  if (minimumCapacity <= _capacity)   return;
  if (minimumCapacity > 0x1000) {
    _capacity=(minimumCapacity + 0xfff) & ~0xfff;
  }
 else {
    while (_capacity < minimumCapacity) {
      _capacity+=_capacity;
    }
  }
  byte[] bytes=new byte[_capacity];
  System.arraycopy(_buffer,0,bytes,0,_length);
  _buffer=bytes;
}

public void ensureCapacity ( int minimumCapacity ) { if ( minimumCapacity <= _capacity ) return ; if ( minimumCapacity > 0x1000 ) { _capacity = ( minimumCapacity + 0xfff ) & ~ 0xfff ; } else { while ( _capacity < minimumCapacity ) { _capacity += _capacity ; } } byte [ ] bytes = new byte [ _capacity ] ; System . arraycopy ( _buffer , 0 , bytes , 0 , _length ) ; _buffer = bytes ; }
ensure the buffer can hold at least ' minimumcapacity ' bytes .
