Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
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(InputStream in,
OutputStream out,
boolean closeIS,
boolean closeOS) |
static void |
copy(Resource in,
Resource out) |
static void |
delete(File f) |
static String |
first(String str,
String delimiter) |
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 delimiter) |
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 |
removeQuotes(String str,
boolean trim) |
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 lucee 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) |
public Util()
public static final void copy(InputStream in, OutputStream out) throws IOException
in
- out
- IOException
public static final void copy(InputStream in, OutputStream out, boolean closeIS, boolean closeOS) throws IOException
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(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 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 allpublic 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 itSecurityException
- 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 removeQuotes(String str, boolean trim)
Copyright © 2015 Lucee