public class JavaCoreUtils extends Object
| Constructor and Description |
|---|
JavaCoreUtils() |
| Modifier and Type | Method and Description |
|---|---|
LocalDateTime |
convert(Date date)
Converts Date to LocalDateTime.
|
<T> Map<String,T> |
makeMap(String key,
T value)
Returns a Map contains entry with key and value from arguments.
|
<T> Map<String,T> |
makeMap(String key1,
T value1,
String key2,
T value2)
Returns a Map contains entry with key and value from arguments.
|
void |
notNullArgument(Object object,
String argName)
If the input parameter 'object' is null, then throw an IllegalArgumentException.
|
static byte[] |
toByteArray(InputStream in)
It converts Input Stream to byte array.
|
public static byte[] toByteArray(InputStream in) throws IOException
in - sourced input streamIOException - error in the read input streampublic LocalDateTime convert(Date date)
date - input datepublic void notNullArgument(Object object, String argName)
object - an object being checkedargName - Name parameter for a message of the exceptionIllegalArgumentException - if the 'object' parameter is nullpublic <T> Map<String,T> makeMap(String key, T value)
T - a type of value objectkey - a key of Entry Mapvalue - a value of Entry MapCopyright © 2023. All rights reserved.