docs: @NotNull
      public static Metadata readMetadata(@NotNull final InputStream inputStream, final long streamLength) throws ImageProcessingException, IOException
      {
          BufferedInputStream bufferedInputStream = inputStream instanceof BufferedInputStream
              ? (BufferedInputStream)inputStream
              : new BufferedInputStream(inputStream);
  
          FileType fileType = FileTypeDetector.detectFileType(bufferedInputStream);
  
          Metadata metadata = readMetadata(bufferedInputStream, streamLength, fileType);
  
          metadata.addDirectory(new FileTypeDirectory(fileType));
  
          return metadata;
      }