docs: public static int getRequiredSize(byte[] source,
              int offset, int length) throws IOException {
  
          ByteBuffer byteBuffer =
              ByteBuffer.wrap(source, offset, length).asReadOnlyBuffer();
          return getRequiredSize(byteBuffer);
      }