public int read() throws IOException {
  if (!buf.hasRemaining()) {
    return -1;
  }
  return buf.get() & 0xFF;
}

public int read ( ) throws IOException { if ( ! buf . hasRemaining ( ) ) { return - 1 ; } return buf . get ( ) & 0xFF ; }
read an integer value from backed bytebuffer .
