@Override public int read() throws IOException {
  ensureOpen();
  if (next >= length)   return -1;
  return str.charAt(next++);
}

@ Override public int read ( ) throws IOException { ensureOpen ( ) ; if ( next >= length ) return - 1 ; return str . charAt ( next ++ ) ; }
reads a single character .
