@Override
    public int read() throws IOException {
      ByteBuffer bb = waitForAvailableData();
      // logit("read result=" + result);
      return (bb.get() & 0xff);
    }
See the InputStream read method for javadocs. Note that if an attempt to read past the end of
the wrapped ByteBuffer is done this method throws BufferUnderflowException
geode-core/src/main/java/org/apache/geode/internal/tcp/MsgDestreamer.java