Class FileFormatFactory

Object
FileFormatFactory

public class FileFormatFactory extends Object
Creates a FileFormat from a string.
Author:
Owen Feehan
  • Method Details

    • createImageFormat

      public static Optional<ImageFileFormat> createImageFormat(String identifier)
      Creates a ImageFileFormat from an identifier string if its equal to any extension associated with the image file formats in ImageFileFormat.

      The case of the identifier is irrelevant.

      Parameters:
      identifier - an identifier of an image file-format that should match an extension (e.g. jpg or GIF or bmp)
      Returns:
      an ImageFileFormat that matches identifier if it exists.