Class ApacheCommonsUtils
java.lang.Object
eu.europa.esig.dss.utils.apache.impl.ApacheCommonsUtils
- All Implemented Interfaces:
IUtils
Apache Commons implementation of Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanareStringsEqual(String text1, String text2) booleanareStringsEqualIgnoreCase(String text1, String text2) voidcleanDirectory(File directory) voidcloseQuietly(Closeable closeable) intcollectionSize(Collection collection) <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(Object[] array) booleanisArrayNotEmpty(byte[] 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) <T> List<T>reverseList(List<T> list) 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
- Specified by:
isStringEmptyin interfaceIUtils
-
isStringNotEmpty
- Specified by:
isStringNotEmptyin interfaceIUtils
-
isStringBlank
- Specified by:
isStringBlankin interfaceIUtils
-
isStringNotBlank
- Specified by:
isStringNotBlankin interfaceIUtils
-
areStringsEqual
- Specified by:
areStringsEqualin interfaceIUtils
-
areStringsEqualIgnoreCase
- Specified by:
areStringsEqualIgnoreCasein interfaceIUtils
-
isStringDigits
- Specified by:
isStringDigitsin interfaceIUtils
-
trim
-
joinStrings
- Specified by:
joinStringsin interfaceIUtils
-
substringAfter
- Specified by:
substringAfterin interfaceIUtils
-
endsWithIgnoreCase
- Specified by:
endsWithIgnoreCasein interfaceIUtils
-
getFileNameExtension
- Specified by:
getFileNameExtensionin interfaceIUtils
-
lowerCase
-
upperCase
-
isArrayEmpty
- Specified by:
isArrayEmptyin interfaceIUtils
-
isArrayNotEmpty
- Specified by:
isArrayNotEmptyin interfaceIUtils
-
isArrayNotEmpty
public boolean isArrayNotEmpty(byte[] array) - Specified by:
isArrayNotEmptyin interfaceIUtils
-
isArrayEmpty
public boolean isArrayEmpty(byte[] array) - Specified by:
isArrayEmptyin interfaceIUtils
-
subarray
public byte[] subarray(byte[] array, int start, int length) -
isTrue
-
isCollectionEmpty
- Specified by:
isCollectionEmptyin interfaceIUtils
-
isCollectionNotEmpty
- Specified by:
isCollectionNotEmptyin interfaceIUtils
-
isMapEmpty
- Specified by:
isMapEmptyin interfaceIUtils
-
isMapNotEmpty
- Specified by:
isMapNotEmptyin interfaceIUtils
-
collectionSize
- Specified by:
collectionSizein interfaceIUtils
-
isHexEncoded
- Specified by:
isHexEncodedin interfaceIUtils
-
toHex
-
fromHex
-
isBase64Encoded
- Specified by:
isBase64Encodedin interfaceIUtils
-
toBase64
-
fromBase64
- Specified by:
fromBase64in interfaceIUtils
-
toByteArray
- Specified by:
toByteArrayin interfaceIUtils- Throws:
IOException
-
closeQuietly
- Specified by:
closeQuietlyin interfaceIUtils
-
copy
- Specified by:
copyin interfaceIUtils- Throws:
IOException
-
write
- Specified by:
writein interfaceIUtils- Throws:
IOException
-
getInputStreamSize
- Specified by:
getInputStreamSizein interfaceIUtils- Throws:
IOException
-
cleanDirectory
- Specified by:
cleanDirectoryin interfaceIUtils- Throws:
IOException
-
listFiles
-
reverseList
- Specified by:
reverseListin interfaceIUtils
-
containsAny
- Specified by:
containsAnyin interfaceIUtils
-