docs: public void sendStream(InputStream inStream, int remaining) throws IOException {
      int expectedLength = remaining;
      if (streamBuffer == null) {
        streamBuffer = new byte[8192];
      }
  
      while (remaining > 0) {
        int count = (remaining > streamBuffer.length ? streamBuffer.length : remaining);
        int readCount;
  
        try {
          readCount = inStream.read(streamBuffer, 0, count);
          if (readCount < 0) {
            throw new EOFException(
                GT.tr("Premature end of input stream, expected {0} bytes, but only read {1}.",
                    expectedLength, expectedLength - remaining));
          }
        } catch (IOException ioe) {
          while (remaining > 0) {
            send(streamBuffer, count);
            remaining -= count;
            count = (remaining > streamBuffer.length ? streamBuffer.length : remaining);
          }
          throw new PGBindException(ioe);
        }
  
        send(streamBuffer, readCount);
        remaining -= readCount;
      }
    }