public class FormatUtil extends Object
Constructor and Description |
---|
FormatUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
escapeHtml(String str)
Escape html tags
|
static byte[] |
fixUTF8(byte[] input)
Fix UTF-8 NULL
|
static String |
fixUTF8(String input)
Fix UTF-8 NULL
|
static String |
formatArray(String[] values)
Format string array
|
static String |
formatDate(Calendar cal)
Format calendar date
|
static String |
formatMiliSeconds(long time)
Format time interval for humans
|
static String |
formatObject(Object value)
Format object
|
static String |
formatSeconds(long time)
Format time interval for humans
|
static String |
formatSize(long size)
Format the document size for human readers
|
static String |
formatTime(long time)
Format time for human readers
|
static Collection<LogMessage> |
parseLog(File flog,
int begin,
int end,
String str)
Parser log file
|
static String |
sanitizeInput(String string)
Sanitize HTML
|
static String |
trimUnicodeSurrogates(String text)
Trim Unicode surrogate characters
http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates
|
static boolean |
validUTF8(byte[] input)
Check for valid UTF8
|
public static String formatSize(long size)
public static String formatTime(long time)
public static String formatSeconds(long time)
public static String formatMiliSeconds(long time)
public static String sanitizeInput(String string)
http://www.rgagnon.com/javadetails/java-0627.html
public static Collection<LogMessage> parseLog(File flog, int begin, int end, String str) throws IOException
IOException
public static boolean validUTF8(byte[] input)
public static byte[] fixUTF8(byte[] input)
Copyright © 2015. All Rights Reserved.