code: public synchronized int read(byte b[], int off, int len) {
          if (b == null) {
              throw new NullPointerException();
          } else if ((off < 0) || (off > b.length) || (len < 0) ||
                     ((off + len) > b.length) || ((off + len) < 0)) {
              throw new IndexOutOfBoundsException();
          }
          if (pos >= count) {
              return -1;
          }
  
          int avail = count - pos;
          if (len > avail) {
              len = avail;
          }
          if (len <= 0) {
              return 0;
          }
          String  s = buffer;
          int cnt = len;
          while (--cnt >= 0) {
              b[off++] = (byte)s.charAt(pos++);
          }
  
          return len;
      }
docs: Reads up to <code>len</code> bytes of data from this input stream
  into an array of bytes.
  <p>
  The <code>read</code> method of
  <code>StringBufferInputStream</code> cannot block. It copies the
  low eight bits from the characters in this input stream's buffer into
  the byte array argument.
  
  @param      b     the buffer into which the data is read.
  @param      off   the start offset of the data.
  @param      len   the maximum number of bytes read.
  @return     the total number of bytes read into the buffer, or
  <code>-1</code> if there is no more data because the end of
  the stream has been reached.