public class Utility extends Object
| Constructor and Description |
|---|
Utility() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Annotation> |
findField(Class<?> type,
Class<T> annotationClass) |
static byte[] |
getBytesFromFile(String filePath) |
static String |
getStringFromFile(String filePath) |
static String |
getStringFromFile(String filePath,
String encoding) |
static boolean |
saveStringToFile(String filePath,
String content,
boolean isOverwrite) |
public static <T extends Annotation> Field findField(Class<?> type, Class<T> annotationClass) throws Exception
Exceptionpublic static String getStringFromFile(String filePath) throws FileNotFoundException
FileNotFoundExceptionpublic static String getStringFromFile(String filePath, String encoding) throws FileNotFoundException
FileNotFoundExceptionpublic static boolean saveStringToFile(String filePath, String content, boolean isOverwrite)
public static byte[] getBytesFromFile(String filePath) throws FileNotFoundException
FileNotFoundExceptionCopyright © 2015. All rights reserved.