Class GraphicsUtils


  • public class GraphicsUtils
    extends Object
    Utilities for working with graphics-related data.
    Author:
    Guus der Kinderen, guus.der.kinderen@gmail.com
    • Constructor Detail

      • GraphicsUtils

        public GraphicsUtils()
    • Method Detail

      • isImage

        public static boolean isImage​(InputStream stream)
        Checks if the provided input stream represents an image.
        Parameters:
        stream - The data to be parsed. Cannot be null.
        Returns:
        true if the provided data is successfully identified as an image, otherwise false.
      • isImage

        public static boolean isImage​(byte[] bytes)
        Checks if the provided byte array represents an image.
        Parameters:
        bytes - The data to be parsed. Cannot be null.
        Returns:
        true if the provided data is successfully identified as an image, otherwise false.