docs: public long copyIn(final String sql, Reader from, int bufferSize)
        throws SQLException, IOException {
      char[] cbuf = new char[bufferSize];
      int len;
      CopyIn cp = copyIn(sql);
      try {
        while ((len = from.read(cbuf)) >= 0) {
          if (len > 0) {
            byte[] buf = encoding.encode(new String(cbuf, 0, len));
            cp.writeToCopy(buf, 0, buf.length);
          }
        }
        return cp.endCopy();
      } finally { // see to it that we do not leave the connection locked
        if (cp.isActive()) {
          cp.cancelCopy();
        }
      }
    }