code: public int read(byte b[], int off, int len) throws IOException {
          if (ostart >= ofinish) {
              // we loop for new data as the spec says we are blocking
              int i = 0;
              while (i == 0) i = getMoreData();
              if (i == -1) return -1;
          }
          if (len <= 0) {
              return 0;
          }
          int available = ofinish - ostart;
          if (len < available) available = len;
          if (b != null) {
              System.arraycopy(obuffer, ostart, b, off, available);
          }
          ostart = ostart + available;
          return available;
      }
docs: Reads up to <code>len</code> bytes of data from this input stream
  into an array of bytes. This method blocks until some input is
  available. If the first argument is <code>null,</code> up to
  <code>len</code> bytes are read and discarded.
  
  @param      b     the buffer into which the data is read.
  @param      off   the start offset in the destination array
  <code>buf</code>
  @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.
  @exception  IOException  if an I/O error occurs.
  @see        java.io.InputStream#read()
  @since      JCE1.2