@Override
  public int read(final char[] cbuf, final int off, final int len) throws IOException {
    int bytesRead = 0;
    while (ready() && bytesRead < len) {
      final int aChar = myStream.read();
      if (aChar == -1) {
        return bytesRead == 0 ? -1 : bytesRead;
      }
      cbuf[off + (bytesRead++)] = (char)aChar;
    }
    return bytesRead;
  }
@Override
  public int read(final char[] cbuf, final int off, final int len)