Class ApacheCommonsUtils
java.lang.Object
eu.europa.esig.dss.utils.apache.impl.ApacheCommonsUtils
Apache Commons implementation of Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanareStringsEqual(String text1, String text2) booleanareStringsEqualIgnoreCase(String text1, String text2) intarraySize(byte[] array) intarraySize(char[] array) intvoidcleanDirectory(File directory) voidcloseQuietly(Closeable closeable) intcollectionSize(Collection collection) booleancompareInputStreams(InputStream stream1, InputStream stream2) byte[]concat(byte[]... byteArrays) <T> booleancontainsAny(Collection<T> superCollection, Collection<T> subCollection) voidcopy(InputStream is, OutputStream os) booleanendsWithIgnoreCase(String text, String expected) byte[]fromBase64(String base64) byte[]getFileNameExtension(String filename) longbooleanisArrayEmpty(byte[] array) booleanisArrayEmpty(char[] array) booleanisArrayEmpty(Object[] array) booleanisArrayNotEmpty(byte[] array) booleanisArrayNotEmpty(char[] array) booleanisArrayNotEmpty(Object[] array) booleanisBase64Encoded(String base64String) booleanisCollectionEmpty(Collection collection) booleanisCollectionNotEmpty(Collection collection) booleanisHexEncoded(String hexString) booleanisMapEmpty(Map<?, ?> map) booleanisMapNotEmpty(Map<?, ?> map) booleanisStringBlank(String text) booleanisStringDigits(String text) booleanisStringEmpty(String text) booleanisStringNotBlank(String text) booleanisStringNotEmpty(String text) booleanjoinStrings(Collection<String> strings, String separator) int<T> List<T> reverseList(List<T> list) booleanstartsWith(byte[] byteArray, byte[] prefixArray) booleanstartsWith(InputStream inputStream, byte[] prefixArray) byte[]subarray(byte[] array, int start, int length) substringAfter(String text, String after) toBase64(byte[] bytes) byte[]toHex(byte[] bytes) voidwrite(byte[] content, OutputStream os)
-
Constructor Details
-
ApacheCommonsUtils
public ApacheCommonsUtils()Default constructor
-
-
Method Details
-
isStringEmpty
-
isStringNotEmpty
-
isStringBlank
-
isStringNotBlank
-
areStringsEqual
-
areStringsEqualIgnoreCase
-
isStringDigits
-
trim
-
joinStrings
-
concat
public byte[] concat(byte[]... byteArrays) -
substringAfter
-
endsWithIgnoreCase
-
getFileNameExtension
-
lowerCase
-
upperCase
-
isArrayEmpty
-
isArrayNotEmpty
-
arraySize
-
isArrayEmpty
public boolean isArrayEmpty(byte[] array) -
isArrayNotEmpty
public boolean isArrayNotEmpty(byte[] array) -
arraySize
public int arraySize(byte[] array) -
isArrayEmpty
public boolean isArrayEmpty(char[] array) -
isArrayNotEmpty
public boolean isArrayNotEmpty(char[] array) -
arraySize
public int arraySize(char[] array) -
subarray
public byte[] subarray(byte[] array, int start, int length) -
isTrue
-
isCollectionEmpty
-
isCollectionNotEmpty
-
collectionSize
-
isMapEmpty
-
isMapNotEmpty
-
mapSize
-
isHexEncoded
-
toHex
-
fromHex
-
isBase64Encoded
-
toBase64
-
fromBase64
-
toByteArray
- Throws:
IOException
-
closeQuietly
-
copy
- Throws:
IOException
-
write
- Throws:
IOException
-
nullOutputStream
-
getInputStreamSize
- Throws:
IOException
-
compareInputStreams
- Throws:
IOException
-
startsWith
public boolean startsWith(byte[] byteArray, byte[] prefixArray) -
startsWith
- Throws:
IOException
-
cleanDirectory
- Throws:
IOException
-
listFiles
-
reverseList
-
containsAny
-