docs: public synchronized int read(byte[] b, int off, int len)
          throws IOException {
          if (in == null) {
              throw new IOException("Stream Closed");
          }
          if (len == 0) {
              return 0;
          }
          while (slack == null) {
              char[] buf = new char[len]; // might read too much
              int n = in.read(buf);
              if (n == -1) {
                  return -1;
              }
              if (n > 0) {
                  slack = new String(buf, 0, n).getBytes(encoding);
                  begin = 0;
              }
          }
  
          if (len > slack.length - begin) {
              len = slack.length - begin;
          }
  
          System.arraycopy(slack, begin, b, off, len);
  
          if ((begin += len) >= slack.length) {
              slack = null;
          }
  
          return len;
      }