Package org.jivesoftware.util
Class GraphicsUtils
- java.lang.Object
-
- org.jivesoftware.util.GraphicsUtils
-
public class GraphicsUtils extends Object
Utilities for working with graphics-related data.- Author:
- Guus der Kinderen, guus.der.kinderen@gmail.com
-
-
Constructor Summary
Constructors Constructor Description GraphicsUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
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.
-
-