@Override public int read() throws IOException {
  if (closed) {
    throw new IOException("Attempted read from closed stream.");
  }
  if (pos >= contentLength) {
    return -1;
  }
  pos++;
  return wrappedStream.read();
}

@ Override public int read ( ) throws IOException { if ( closed ) { throw new IOException ( "Attempted read from closed stream." ) ; } if ( pos >= contentLength ) { return - 1 ; } pos ++ ; return wrappedStream . read ( ) ; }
read the next byte from the stream
