protected synchronized void receive(int b) throws IOException {
  checkStateForReceive();
  writeSide=Thread.currentThread();
  if (in == out)   awaitSpace();
  if (in < 0) {
    in=0;
    out=0;
  }
  buffer[in++]=(byte)(b & 0xFF);
  if (in >= buffer.length) {
    in=0;
  }
}

protected synchronized void receive ( int b ) throws IOException { checkStateForReceive ( ) ; writeSide = Thread . currentThread ( ) ; if ( in == out ) awaitSpace ( ) ; if ( in < 0 ) { in = 0 ; out = 0 ; } buffer [ in ++ ] = ( byte ) ( b & 0xFF ) ; if ( in >= buffer . length ) { in = 0 ; } }
receives a byte of data . this method will block if no input is available .
