code: public int read() throws IOException {
          if (position == size) {
              return -1; // EOF
          }
          if (position < buffer.length) {
              // Convert to unsigned int.
              int c = buffer[(int) position] & 0xFF;
              position++;
              return c;
          }
          int c = diskStream.read();
          if (c >= 0) {
              position++;
          }
          return c;
      }
docs: /* (non-Javadoc)
  @see java.io.InputStream#read()