Package org.c02e.jpgpj.util
Class Util
java.lang.Object
org.c02e.jpgpj.util.Util
Utility functions, used internally by JPGPJ.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
bestFileBufferSize
(long fileSize, int maxFileBufferSize) Returns the exact fileSize with a maximum of maxFileBufferSize and a minimum of 1.static String
formatAsHex
(byte[] bytes) Formats the specified byte array as a hex string.static String
formatKeyId
(Long id) Formats the specified key id in the "0xlong" format.static boolean
isEmpty
(char[] a) True if the specified character array is null or empty.static boolean
True if the specified string is null or empty.static boolean
isEmpty
(Collection<?> c) True if the specified collection is null or empty.static boolean
True if the specified map is null or empty.
-
Field Details
-
hexDigits
protected static final char[] hexDigits
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
isEmpty
public static boolean isEmpty(char[] a) True if the specified character array is null or empty. -
isEmpty
True if the specified string is null or empty. -
isEmpty
True if the specified collection is null or empty. -
isEmpty
True if the specified map is null or empty. -
formatKeyId
Formats the specified key id in the "0xlong" format. -
formatAsHex
Formats the specified byte array as a hex string. -
bestFileBufferSize
public static int bestFileBufferSize(long fileSize, int maxFileBufferSize) Returns the exact fileSize with a maximum of maxFileBufferSize and a minimum of 1.
-