|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.loader.util.Util
public class Util
Util class for different little jobs
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static void |
closeEL(InputStream is)
close inputstream without a Exception |
static void |
closeEL(InputStream is,
OutputStream os)
close inputstream without a Exception |
static void |
closeEL(OutputStream os)
close outputstream without a Exception |
static void |
closeEL(Reader r)
close reader without a Exception |
static void |
closeEL(Writer w)
close reader without a Exception |
static void |
copy(InputStream in,
OutputStream out)
copy a inputstream to a outputstream |
static void |
copy(Resource in,
Resource out)
|
static String |
first(String str,
String delimeter)
|
static File |
getCanonicalFileEL(File file)
Returns the canonical form of this abstract pathname. |
static String |
getContentAsString(InputStream is,
String charset)
|
static File |
getHomeDirectory()
returns the Hoome Directory of the System |
static File |
getSystemDirectory()
|
static File |
getTempDirectory()
returns the Temp Directory of the System |
static boolean |
hasUpperCase(String str)
|
static boolean |
isEmpty(String str)
check if string is empty (null or "") |
static boolean |
isEmpty(String str,
boolean trim)
check if string is empty (null or "") |
static String |
last(String str,
String delimeter)
|
static int |
length(String str)
|
static String |
parsePlaceHolder(String path)
replace path placeholder with the real path, placeholders are [{temp-directory},{system-directory},{home-directory}] |
static String |
replace(String str,
String sub1,
String sub2,
boolean onlyFirst)
|
static boolean |
toBooleanValue(String str)
|
static BufferedInputStream |
toBufferedInputStream(InputStream is)
|
static BufferedOutputStream |
toBufferedOutputStream(OutputStream os)
|
static String |
toHTTPTimeString()
|
static String |
toHTTPTimeString(Date date)
|
static int |
toInVersion(String version)
cast a railo string version to a int version |
static String |
toString(InputStream is)
read String data from a InputStream and returns it as String Object |
static String |
toStringVersion(int version)
|
static String |
toVariableName(String str,
boolean addIdentityNumber)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static final void copy(InputStream in, OutputStream out) throws IOException
in
- out
-
IOException
public static String toString(InputStream is) throws IOException
is
- InputStream to read data from.
IOException
public static boolean toBooleanValue(String str) throws IOException
IOException
public static void closeEL(InputStream is, OutputStream os)
is
- os
- public static void closeEL(InputStream is)
is
- public static void closeEL(Reader r)
is
- public static void closeEL(Writer w)
is
- public static void closeEL(OutputStream os)
os
- public static String getContentAsString(InputStream is, String charset) throws IOException
is
- inputStream to get content Fromcharset
-
IOException
public static boolean isEmpty(String str)
str
-
public static boolean isEmpty(String str, boolean trim)
str
-
public static int length(String str)
public static int toInVersion(String version)
version
-
public static String toStringVersion(int version)
public static String replace(String str, String sub1, String sub2, boolean onlyFirst)
str
- String to work withsub1
- value to replacesub2
- replacementonlyFirst
- replace only first or all
public static String parsePlaceHolder(String path)
path
-
public static File getTempDirectory()
public static File getHomeDirectory()
public static File getSystemDirectory()
public static File getCanonicalFileEL(File file)
file
- file to get canoncial form from it
SecurityException
- If a required system property value cannot be accessed.public static String toHTTPTimeString(Date date)
public static String toHTTPTimeString()
public static boolean hasUpperCase(String str)
public static BufferedInputStream toBufferedInputStream(InputStream is)
public static BufferedOutputStream toBufferedOutputStream(OutputStream os)
public static void copy(Resource in, Resource out) throws IOException
IOException
public static String toVariableName(String str, boolean addIdentityNumber)
public static String first(String str, String delimeter)
public static String last(String str, String delimeter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |