@Override public void write(int b){
  int newCnt=cnt + 1;
  if (newCnt > buf.length)   buf=Arrays.copyOf(buf,Math.max(buf.length << 1,newCnt));
  buf[cnt]=(byte)b;
  cnt=newCnt;
}

@ Override public void write ( int b ) { int newCnt = cnt + 1 ; if ( newCnt > buf . length ) buf = Arrays . copyOf ( buf , Math . max ( buf . length << 1 , newCnt ) ) ; buf [ cnt ] = ( byte ) b ; cnt = newCnt ; }
writes the specified byte to this byte array output stream .
