Package org.jivesoftware.util
Class GraphicsUtils
java.lang.Object
org.jivesoftware.util.GraphicsUtils
Utilities for working with graphics-related data.
- Author:
- Guus der Kinderen, guus.der.kinderen@gmail.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isImage
(byte[] bytes) Checks if the provided byte array represents an image.static boolean
isImage
(InputStream stream) Checks if the provided input stream represents an image.
-
Constructor Details
-
GraphicsUtils
public GraphicsUtils()
-
-
Method Details
-
isImage
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.
-