public class StringUtil
extends java.lang.Object
Constructor and Description |
---|
StringUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
file2String(java.io.File file)
Convert the whole contexts of file into a string.
|
static java.lang.String |
file2String(java.io.File file,
java.lang.String enc)
Convert the whole contexts of file into a string.
|
static java.lang.String |
getHeader(java.lang.String s,
int headerLength)
Return header part with the defined headerLength.
|
static boolean |
isEmptyBytes(byte[] bytes) |
static boolean |
isEmptyString(java.lang.String s) |
static boolean |
isEmptyVarargs(java.lang.Object... objects) |
static void |
string2File(java.lang.String data,
java.io.File file)
Write a string into a file.
|
static void |
string2File(java.lang.String data,
java.io.File file,
java.lang.String enc)
Write a string into a file.
|
static java.lang.String |
toCurrentStackString()
Convert the current position's stack info into a String.
|
static java.lang.String |
toString(java.lang.Throwable t)
Convert the Throwable's all info into a String.
|
public static boolean isEmptyString(java.lang.String s)
s
- public static boolean isEmptyBytes(byte[] bytes)
bytes
- public static boolean isEmptyVarargs(java.lang.Object... objects)
objects
- public static java.lang.String getHeader(java.lang.String s, int headerLength)
s
- headerLength
- public static java.lang.String toString(java.lang.Throwable t)
public static java.lang.String toCurrentStackString()
public static java.lang.String file2String(java.io.File file) throws java.lang.Exception
java.lang.Exception
public static java.lang.String file2String(java.io.File file, java.lang.String enc) throws java.lang.Exception
java.lang.Exception
public static void string2File(java.lang.String data, java.io.File file) throws java.lang.Exception
java.lang.Exception
public static void string2File(java.lang.String data, java.io.File file, java.lang.String enc) throws java.lang.Exception
java.lang.Exception