Package at.gv.egovernment.moaspss.util
Class MiscUtil
java.lang.Object
at.gv.egovernment.moaspss.util.MiscUtil
Class providing several utility methods.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareAllEmpty(Empty... empties) static booleanareAllEmpty(String... strings) static booleanareAllNull(Object... objects) static voidassertNotEmpty(byte[] param, String name) static voidassertNotEmpty(Empty empty, String name) static voidassertNotEmpty(String param, String name) static <T> voidassertNotEmpty(T[] param, String name) static voidassertNotNull(Object param, String name) static StringconvertDateFromStandardToXML(String dateString) static voidcopyStream(InputStream is, OutputStream os) static StringextractContentType(String contentTypeString) static StringformatDate(Date date, String format) static XMLGregorianCalendarstatic XMLGregorianCalendargetXMLGregorianCalendar(Date date) static booleanisEmpty(byte[] data) static booleanstatic booleanstatic <T> booleanisEmpty(Collection<T> c) static booleanisEmpty(Properties props) static <T> booleanisEmpty(T[] array) static booleanisNotEmpty(byte[] data) static booleanisNotEmpty(Empty empty) static booleanisNotEmpty(String str) static <T> booleanisNotEmpty(Collection<T> c) static <T> booleanisNotEmpty(T[] array) static Datestatic Datestatic DateparseXMLDate(String xmlDate) static X509CertificatereadCertificate(InputStream certStream) static StringremovePrecedingSlash(String path) static StringremovePrecedingSlash(String path, String slash) static byte[]sourceToByteArray(Source result)
-
Field Details
-
DEFAULT_SLASH
- See Also:
-
-
Constructor Details
-
MiscUtil
public MiscUtil()
-
-
Method Details
-
copyStream
- Throws:
IOException
-
assertNotNull
-
areAllNull
-
extractContentType
-
getXMLGregorianCalendar
public static XMLGregorianCalendar getXMLGregorianCalendar(Date date) throws DatatypeConfigurationException - Throws:
DatatypeConfigurationException
-
getXMLGregorianCalendar
public static XMLGregorianCalendar getXMLGregorianCalendar(String str) throws DatatypeConfigurationException - Throws:
DatatypeConfigurationException
-
readCertificate
- Throws:
CertificateException
-
isEmpty
-
isNotEmpty
-
sourceToByteArray
- Throws:
TransformerException
-
removePrecedingSlash
-
removePrecedingSlash
-
assertNotEmpty
-
isEmpty
-
isEmpty
-
isNotEmpty
-
isEmpty
public static boolean isEmpty(byte[] data) -
isNotEmpty
public static boolean isNotEmpty(byte[] data) -
isEmpty
-
isNotEmpty
-
areAllEmpty
-
areAllEmpty
-
assertNotEmpty
-
assertNotEmpty
-
assertNotEmpty
-
parseXMLDate
- Throws:
EgovUtilException
-
isEmpty
public static <T> boolean isEmpty(T[] array) -
isNotEmpty
public static <T> boolean isNotEmpty(T[] array) -
convertDateFromStandardToXML
-
parseDate
-
parseDate
-
formatDate
-