code: @Override
      public int read( final char cbuf[],
                       final int off,
                       final int len )
          throws IOException
      {
          synchronized ( lock )
          {
              ensureOpen();
              if ( ( off < 0 ) || ( off > cbuf.length ) || ( len < 0 ) || ( ( off + len ) > cbuf.length ) || ( ( off + len ) < 0 ) )
              {
                  throw new IndexOutOfBoundsException();
              }
              else if ( len == 0 )
              {
                  return 0;
              }
              if ( next >= length )
                  return -1;
              int n = Math.min( length - next, len );
  
              if( seq instanceof StringBuffer )
              {
                  ( (StringBuffer) seq ).getChars( next, next + n, cbuf, off );
              }
              else if( seq instanceof StringBuilder )
              {
                  ( (StringBuilder) seq ).getChars( next, next + n, cbuf, off );
              }
              else if( seq instanceof String )
              {
                  ( (String) seq ).getChars( next, next + n, cbuf, off );
              }
              else
              {
                  seq.subSequence( next, next + n ).toString().getChars( 0, n, cbuf, off );
              }
  
              next += n;
              return n;
          }
      }
docs: Reads characters into a portion of an array.
  
  @param cbuf
  Destination buffer
  @param off
  Offset at which to start writing characters
  @param len
  Maximum number of characters to read
  
  @return The number of characters read, or -1 if the end of the stream has
  been reached
  
  @exception IOException
  If an I/O error occurs