Package org.xhtmlrenderer.util
Class Util
- java.lang.Object
-
- org.xhtmlrenderer.util.Util
-
-
Constructor Summary
Constructors Constructor Description Util(OutputStream out)Util(PrintWriter writer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcenter(JDialog frame)static voidcenter(JFrame frame)static Stringfile_to_string(File file)static Stringfile_to_string(String filename)static Stringinputstream_to_string(InputStream in)static booleanisEqual(String str1, String str2)static booleanisEqual(String str1, String str2, boolean ignoreCase)static booleanisNullOrEmpty(String str)static booleanisNullOrEmpty(String str, boolean trim)static booleanisNumber(String str)Gets the number attribute of the Util classstatic String[]list_to_strings(List<?> l)voidprint(Object o)voidprint_array(byte[] array)voidprint_array(int[] array)voidprint_array(int[][] array)voidprint_array(Object[] array)voidprint_calendar(Calendar cal)voidprint_date(Date date)voidprint_map(Map<?,?> h)voidprint_vector(Vector<?> v)voidprintln(Object o)voidprintln(Object o, boolean line)voidprintUnixtime(long sec)static Stringreplace(String source, String target, String replacement)voidsetOn(boolean on)Sets the on attribute of the Util objectvoidsetPrintWriter(PrintWriter writer)Sets the printWriter attribute of the Util objectstatic voidsleep(long msec)static Stringstack_to_string(Exception e)static Stringstack_to_string(Throwable e)static voidstring_to_file(String text, File file)static intstring_to_int(String str)static List<Object>to_list(Object[] array)static List<?>toList(Object[] array)static String[]vector_to_strings(Vector<?> v)
-
-
-
Constructor Detail
-
Util
public Util(PrintWriter writer)
-
Util
public Util(OutputStream out)
-
-
Method Detail
-
print
public void print(Object o)
-
println
public void println(Object o)
-
println
public void println(Object o, boolean line)
-
print_vector
public void print_vector(Vector<?> v)
-
print_array
public void print_array(int[][] array)
-
print_array
public void print_array(Object[] array)
-
print_array
public void print_array(int[] array)
-
print_map
public void print_map(Map<?,?> h)
-
print_array
public void print_array(byte[] array)
-
print_date
public void print_date(Date date)
-
print_calendar
public void print_calendar(Calendar cal)
-
printUnixtime
public void printUnixtime(long sec)
-
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 IOException
- Throws:
IOException
-
string_to_file
public static void string_to_file(String text, File file) throws IOException
- Throws:
IOException
-
string_to_int
public static int string_to_int(String str)
-
inputstream_to_string
public static String inputstream_to_string(InputStream in) throws IOException
- Throws:
IOException
-
file_to_string
public static String file_to_string(File file) throws IOException
- Throws:
IOException
-
sleep
public static void sleep(long msec)
-
center
public static void center(JFrame frame)
-
center
public static void center(JDialog frame)
-
isNumber
public static boolean isNumber(String str)
Gets the number attribute of the Util class
-
isNullOrEmpty
public static boolean isNullOrEmpty(String str)
-
isNullOrEmpty
public static boolean isNullOrEmpty(String str, boolean trim)
-
-