Class ApacheCommonsUtils

java.lang.Object
eu.europa.esig.dss.utils.apache.impl.ApacheCommonsUtils

public class ApacheCommonsUtils extends Object
Apache Commons implementation of Utils
  • Constructor Details

    • ApacheCommonsUtils

      public ApacheCommonsUtils()
      Default constructor
  • Method Details

    • isStringEmpty

      public boolean isStringEmpty(String text)
    • isStringNotEmpty

      public boolean isStringNotEmpty(String text)
    • isStringBlank

      public boolean isStringBlank(String text)
    • isStringNotBlank

      public boolean isStringNotBlank(String text)
    • areStringsEqual

      public boolean areStringsEqual(String text1, String text2)
    • areStringsEqualIgnoreCase

      public boolean areStringsEqualIgnoreCase(String text1, String text2)
    • isStringDigits

      public boolean isStringDigits(String text)
    • trim

      public String trim(String text)
    • joinStrings

      public String joinStrings(Collection<String> strings, String separator)
    • concat

      public byte[] concat(byte[]... byteArrays)
    • substringAfter

      public String substringAfter(String text, String after)
    • endsWithIgnoreCase

      public boolean endsWithIgnoreCase(String text, String expected)
    • getFileNameExtension

      public String getFileNameExtension(String filename)
    • lowerCase

      public String lowerCase(String text)
    • upperCase

      public String upperCase(String text)
    • isArrayEmpty

      public boolean isArrayEmpty(Object[] array)
    • isArrayNotEmpty

      public boolean isArrayNotEmpty(Object[] array)
    • arraySize

      public int arraySize(Object[] array)
    • 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

      public boolean isTrue(Boolean bool)
    • isCollectionEmpty

      public boolean isCollectionEmpty(Collection collection)
    • isCollectionNotEmpty

      public boolean isCollectionNotEmpty(Collection collection)
    • collectionSize

      public int collectionSize(Collection collection)
    • isMapEmpty

      public boolean isMapEmpty(Map<?,?> map)
    • isMapNotEmpty

      public boolean isMapNotEmpty(Map<?,?> map)
    • mapSize

      public int mapSize(Map<?,?> map)
    • isHexEncoded

      public boolean isHexEncoded(String hexString)
    • toHex

      public String toHex(byte[] bytes)
    • fromHex

      public byte[] fromHex(String hex)
    • isBase64Encoded

      public boolean isBase64Encoded(String base64String)
    • toBase64

      public String toBase64(byte[] bytes)
    • fromBase64

      public byte[] fromBase64(String base64)
    • toByteArray

      public byte[] toByteArray(InputStream is) throws IOException
      Throws:
      IOException
    • closeQuietly

      public void closeQuietly(Closeable closeable)
    • copy

      public void copy(InputStream is, OutputStream os) throws IOException
      Throws:
      IOException
    • write

      public void write(byte[] content, OutputStream os) throws IOException
      Throws:
      IOException
    • nullOutputStream

      public OutputStream nullOutputStream()
    • getInputStreamSize

      public long getInputStreamSize(InputStream is) throws IOException
      Throws:
      IOException
    • compareInputStreams

      public boolean compareInputStreams(InputStream stream1, InputStream stream2) throws IOException
      Throws:
      IOException
    • startsWith

      public boolean startsWith(byte[] byteArray, byte[] prefixArray)
    • startsWith

      public boolean startsWith(InputStream inputStream, byte[] prefixArray) throws IOException
      Throws:
      IOException
    • cleanDirectory

      public void cleanDirectory(File directory) throws IOException
      Throws:
      IOException
    • listFiles

      public Collection<File> listFiles(File folder, String[] extensions, boolean recursive)
    • reverseList

      public <T> List<T> reverseList(List<T> list)
    • containsAny

      public <T> boolean containsAny(Collection<T> superCollection, Collection<T> subCollection)