code: public int read(byte b[], int off, int len) throws IOException {
          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();
          } else if (len == 0) {
              return 0;
          }
  
          int c = read();
          if (c == -1) {
              return -1;
          }
          b[off] = (byte)c;
  
          int i = 1;
          try {
              for (; i < len ; i++) {
                  c = read();
                  if (c == -1) {
                      break;
                  }
                  if (b != null) {
                      b[off + i] = (byte)c;
                  }
              }
          } catch (IOException ee) {
          }
          return i;
      }
docs: Reads up to {@code len} bytes of data from this input stream
  into an array of bytes. This method blocks until some input is available.
  <p>
  The {@code read} method of
  {@code LineNumberInputStream} repeatedly calls the
  {@code read} method of zero arguments to fill in the byte array.
  
  @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} if there is no more data because the end of
  this stream has been reached.
  @exception  IOException  if an I/O error occurs.
  @see        java.io.LineNumberInputStream#read()