docs: private byte[] convertInputStreamToBytes(InputStream in) throws IOException {
          ByteArrayOutputStream buffer = new ByteArrayOutputStream();
  
          int len;
          byte[] data = new byte[16384];
  
          while ((len = in.read(data, 0, data.length)) != -1) {
              buffer.write(data, 0, len);
          }
  
          buffer.flush();
          return buffer.toByteArray();
      }