docs: public static ByteBuffer readToByteBuffer(InputStream inStream, int maxSize) throws IOException {
          Validate.isTrue(maxSize >= 0, "maxSize must be 0 (unlimited) or larger");
          final ConstrainableInputStream input = ConstrainableInputStream.wrap(inStream, bufferSize, maxSize);
          return input.readToByteBuffer(maxSize);
      }