Class ApacheCommonsUtils
java.lang.Object
eu.europa.esig.dss.utils.apache.impl.ApacheCommonsUtils
- All Implemented Interfaces:
eu.europa.esig.dss.utils.IUtils
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) <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
- Specified by:
isStringEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
isStringNotEmpty
- Specified by:
isStringNotEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
isStringBlank
- Specified by:
isStringBlankin interfaceeu.europa.esig.dss.utils.IUtils
-
isStringNotBlank
- Specified by:
isStringNotBlankin interfaceeu.europa.esig.dss.utils.IUtils
-
areStringsEqual
- Specified by:
areStringsEqualin interfaceeu.europa.esig.dss.utils.IUtils
-
areStringsEqualIgnoreCase
- Specified by:
areStringsEqualIgnoreCasein interfaceeu.europa.esig.dss.utils.IUtils
-
isStringDigits
- Specified by:
isStringDigitsin interfaceeu.europa.esig.dss.utils.IUtils
-
trim
- Specified by:
trimin interfaceeu.europa.esig.dss.utils.IUtils
-
joinStrings
- Specified by:
joinStringsin interfaceeu.europa.esig.dss.utils.IUtils
-
concat
public byte[] concat(byte[]... byteArrays) - Specified by:
concatin interfaceeu.europa.esig.dss.utils.IUtils
-
substringAfter
- Specified by:
substringAfterin interfaceeu.europa.esig.dss.utils.IUtils
-
endsWithIgnoreCase
- Specified by:
endsWithIgnoreCasein interfaceeu.europa.esig.dss.utils.IUtils
-
getFileNameExtension
- Specified by:
getFileNameExtensionin interfaceeu.europa.esig.dss.utils.IUtils
-
lowerCase
- Specified by:
lowerCasein interfaceeu.europa.esig.dss.utils.IUtils
-
upperCase
- Specified by:
upperCasein interfaceeu.europa.esig.dss.utils.IUtils
-
isArrayEmpty
- Specified by:
isArrayEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
isArrayNotEmpty
- Specified by:
isArrayNotEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
arraySize
- Specified by:
arraySizein interfaceeu.europa.esig.dss.utils.IUtils
-
isArrayEmpty
public boolean isArrayEmpty(byte[] array) - Specified by:
isArrayEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
isArrayNotEmpty
public boolean isArrayNotEmpty(byte[] array) - Specified by:
isArrayNotEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
arraySize
public int arraySize(byte[] array) - Specified by:
arraySizein interfaceeu.europa.esig.dss.utils.IUtils
-
isArrayEmpty
public boolean isArrayEmpty(char[] array) - Specified by:
isArrayEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
isArrayNotEmpty
public boolean isArrayNotEmpty(char[] array) - Specified by:
isArrayNotEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
arraySize
public int arraySize(char[] array) - Specified by:
arraySizein interfaceeu.europa.esig.dss.utils.IUtils
-
subarray
public byte[] subarray(byte[] array, int start, int length) - Specified by:
subarrayin interfaceeu.europa.esig.dss.utils.IUtils
-
isTrue
- Specified by:
isTruein interfaceeu.europa.esig.dss.utils.IUtils
-
isCollectionEmpty
- Specified by:
isCollectionEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
isCollectionNotEmpty
- Specified by:
isCollectionNotEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
isMapEmpty
- Specified by:
isMapEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
isMapNotEmpty
- Specified by:
isMapNotEmptyin interfaceeu.europa.esig.dss.utils.IUtils
-
collectionSize
- Specified by:
collectionSizein interfaceeu.europa.esig.dss.utils.IUtils
-
isHexEncoded
- Specified by:
isHexEncodedin interfaceeu.europa.esig.dss.utils.IUtils
-
toHex
- Specified by:
toHexin interfaceeu.europa.esig.dss.utils.IUtils
-
fromHex
- Specified by:
fromHexin interfaceeu.europa.esig.dss.utils.IUtils
-
isBase64Encoded
- Specified by:
isBase64Encodedin interfaceeu.europa.esig.dss.utils.IUtils
-
toBase64
- Specified by:
toBase64in interfaceeu.europa.esig.dss.utils.IUtils
-
fromBase64
- Specified by:
fromBase64in interfaceeu.europa.esig.dss.utils.IUtils
-
toByteArray
- Specified by:
toByteArrayin interfaceeu.europa.esig.dss.utils.IUtils- Throws:
IOException
-
closeQuietly
- Specified by:
closeQuietlyin interfaceeu.europa.esig.dss.utils.IUtils
-
copy
- Specified by:
copyin interfaceeu.europa.esig.dss.utils.IUtils- Throws:
IOException
-
write
- Specified by:
writein interfaceeu.europa.esig.dss.utils.IUtils- Throws:
IOException
-
nullOutputStream
- Specified by:
nullOutputStreamin interfaceeu.europa.esig.dss.utils.IUtils
-
getInputStreamSize
- Specified by:
getInputStreamSizein interfaceeu.europa.esig.dss.utils.IUtils- Throws:
IOException
-
compareInputStreams
- Specified by:
compareInputStreamsin interfaceeu.europa.esig.dss.utils.IUtils- Throws:
IOException
-
startsWith
public boolean startsWith(byte[] byteArray, byte[] prefixArray) - Specified by:
startsWithin interfaceeu.europa.esig.dss.utils.IUtils
-
startsWith
- Specified by:
startsWithin interfaceeu.europa.esig.dss.utils.IUtils- Throws:
IOException
-
cleanDirectory
- Specified by:
cleanDirectoryin interfaceeu.europa.esig.dss.utils.IUtils- Throws:
IOException
-
listFiles
- Specified by:
listFilesin interfaceeu.europa.esig.dss.utils.IUtils
-
reverseList
- Specified by:
reverseListin interfaceeu.europa.esig.dss.utils.IUtils
-
containsAny
- Specified by:
containsAnyin interfaceeu.europa.esig.dss.utils.IUtils
-