public void appendByte(int value){
  if (size == 0 || size >= bytes.length) {
    int newSize=Math.max(INITIAL_SIZE,size << 1);
    reserve(newSize);
  }
  bytes[size]=(byte)value;
  size++;
}

public void appendByte ( int value ) { if ( size == 0 || size >= bytes . length ) { int newSize = Math . max ( INITIAL_SIZE , size << 1 ) ; reserve ( newSize ) ; } bytes [ size ] = ( byte ) value ; size ++ ; }
append a byte to the end of the array . if the array is too small , it ' s capacity is doubled .
