Package com.openhtmltopdf.util
Class Util
- java.lang.Object
-
- com.openhtmltopdf.util.Util
-
-
Constructor Summary
Constructors Constructor Description Util(OutputStream out)
Constructor for the Util objectUtil(PrintWriter writer)
Constructor for the Util object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
center(JDialog frame)
Description of the Methodstatic void
center(JFrame frame)
Description of the Methodstatic String
file_to_string(File file)
Description of the Methodstatic String
file_to_string(String filename)
Description of the Methodstatic String
inputstream_to_string(InputStream in)
Description of the Methodstatic boolean
isEqual(String str1, String str2)
static boolean
isEqual(String str1, String str2, boolean ignoreCase)
static boolean
isNullOrEmpty(String str)
static boolean
isNullOrEmpty(String str, boolean trim)
static boolean
isNumber(String str)
Gets the number attribute of the Util classstatic String[]
list_to_strings(List l)
Description of the Methodvoid
print(Object o)
Description of the Methodvoid
print_array(byte[] array)
Description of the Methodvoid
print_array(int[] array)
Description of the Methodvoid
print_array(int[][] array)
Description of the Methodvoid
print_array(Object[] array)
Description of the Methodvoid
print_calendar(Calendar cal)
Description of the Methodvoid
print_date(Date date)
Description of the Methodvoid
print_hashtable(Hashtable h)
Description of the Methodvoid
print_vector(Vector v)
Description of the Methodvoid
println(Object o)
Description of the Methodvoid
println(Object o, boolean line)
Description of the Methodvoid
printUnixtime(long sec)
Description of the Methodstatic String
replace(String source, String target, String replacement)
Description of the Methodvoid
setOn(boolean on)
Sets the on attribute of the Util objectvoid
setPrintWriter(PrintWriter writer)
Sets the printWriter attribute of the Util objectstatic void
sleep(long msec)
Description of the Methodstatic String
stack_to_string(Exception e)
Description of the Methodstatic String
stack_to_string(Throwable e)
Description of the Methodstatic void
string_to_file(String text, File file)
Description of the Methodstatic int
string_to_int(String str)
Description of the Methodstatic List
to_list(Object[] array)
Description of the Methodstatic List
toList(Object[] array)
Description of the Methodstatic String[]
vector_to_strings(Vector v)
Description of the Method
-
-
-
Constructor Detail
-
Util
public Util(PrintWriter writer)
Constructor for the Util object- Parameters:
writer
- PARAM
-
Util
public Util(OutputStream out)
Constructor for the Util object- Parameters:
out
- PARAM
-
-
Method Detail
-
print
public void print(Object o)
Description of the Method- Parameters:
o
- PARAM
-
println
public void println(Object o)
Description of the Method- Parameters:
o
- PARAM
-
println
public void println(Object o, boolean line)
Description of the Method- Parameters:
o
- PARAMline
- PARAM
-
print_vector
public void print_vector(Vector v)
Description of the Method- Parameters:
v
- PARAM
-
print_array
public void print_array(int[][] array)
Description of the Method- Parameters:
array
- PARAM
-
print_array
public void print_array(Object[] array)
Description of the Method- Parameters:
array
- PARAM
-
print_array
public void print_array(int[] array)
Description of the Method- Parameters:
array
- PARAM
-
print_hashtable
public void print_hashtable(Hashtable h)
Description of the Method- Parameters:
h
- PARAM
-
print_array
public void print_array(byte[] array)
Description of the Method- Parameters:
array
- PARAM
-
print_date
public void print_date(Date date)
Description of the Method- Parameters:
date
- PARAM
-
print_calendar
public void print_calendar(Calendar cal)
Description of the Method- Parameters:
cal
- PARAM
-
printUnixtime
public void printUnixtime(long sec)
Description of the Method- Parameters:
sec
- PARAM
-
setOn
public void setOn(boolean on)
Sets the on attribute of the Util object- Parameters:
on
- The new on value
-
setPrintWriter
public void setPrintWriter(PrintWriter writer)
Sets the printWriter attribute of the Util object- Parameters:
writer
- The new printWriter value
-
file_to_string
public static String file_to_string(String filename) throws FileNotFoundException, IOException
Description of the Method- Parameters:
filename
- PARAM- Returns:
- Returns
- Throws:
FileNotFoundException
- ThrowsIOException
- Throws
-
string_to_file
public static void string_to_file(String text, File file) throws IOException
Description of the Method- Parameters:
text
- PARAMfile
- PARAM- Throws:
IOException
- Throws
-
string_to_int
public static int string_to_int(String str)
Description of the Method- Parameters:
str
- PARAM- Returns:
- Returns
-
stack_to_string
public static String stack_to_string(Exception e)
Description of the Method- Parameters:
e
- PARAM- Returns:
- Returns
-
stack_to_string
public static String stack_to_string(Throwable e)
Description of the Method- Parameters:
e
- PARAM- Returns:
- Returns
-
inputstream_to_string
public static String inputstream_to_string(InputStream in) throws IOException
Description of the Method- Parameters:
in
- PARAM- Returns:
- Returns
- Throws:
IOException
- Throws
-
file_to_string
public static String file_to_string(File file) throws IOException
Description of the Method- Parameters:
file
- PARAM- Returns:
- Returns
- Throws:
FileNotFoundException
- ThrowsIOException
- Throws
-
replace
public static String replace(String source, String target, String replacement)
Description of the Method- Parameters:
source
- PARAMtarget
- PARAMreplacement
- PARAM- Returns:
- Returns
-
vector_to_strings
public static String[] vector_to_strings(Vector v)
Description of the Method- Parameters:
v
- PARAM- Returns:
- Returns
-
list_to_strings
public static String[] list_to_strings(List l)
Description of the Method- Parameters:
l
- PARAM- Returns:
- Returns
-
toList
public static List toList(Object[] array)
Description of the Method- Parameters:
array
- PARAM- Returns:
- Returns
-
to_list
public static List to_list(Object[] array)
Description of the Method- Parameters:
array
- PARAM- Returns:
- Returns
-
sleep
public static void sleep(long msec)
Description of the Method- Parameters:
msec
- PARAM
-
center
public static void center(JFrame frame)
Description of the Method- Parameters:
frame
- PARAM
-
center
public static void center(JDialog frame)
Description of the Method- Parameters:
frame
- PARAM
-
isNumber
public static boolean isNumber(String str)
Gets the number attribute of the Util class- Parameters:
str
- PARAM- Returns:
- The number value
-
isNullOrEmpty
public static boolean isNullOrEmpty(String str)
-
isNullOrEmpty
public static boolean isNullOrEmpty(String str, boolean trim)
-
-