com.neuron.app.tonto
Class Util

java.lang.Object
  extended by com.neuron.app.tonto.Util

public final class Util
extends java.lang.Object


Constructor Summary
Util()
           
 
Method Summary
static int bound(int min, int max, int val)
           
static boolean confirmDialog(java.lang.String title, java.lang.String msg)
           
static int decompress(byte[] src, int src_off, int src_len, byte[] dst, int dst_off, int dst_len)
           
static void errorDialog(java.lang.String msg, java.lang.Throwable ex)
           
static int getInt(byte[] buf, int off)
           
static java.lang.String getProperty(java.lang.String prop)
           
static boolean isIBMJDK()
           
static boolean isJDK13()
           
static boolean isJDK14()
           
static boolean isSunJDK()
           
static java.lang.String nickname(java.lang.Object o)
           
static boolean onMacintosh()
           
static boolean onWindows()
           
static boolean onWindows98()
           
static javax.swing.JPanel panelWrap(javax.swing.JComponent c)
           
static byte[] readFile(java.lang.String filename)
           
static byte[] readFully(java.io.InputStream is)
           
static void readFully(java.io.InputStream is, java.io.OutputStream os)
           
static void safeSleep(int time)
           
static void setLabelBorder(java.lang.String label, javax.swing.JComponent c)
           
static void setProperty(java.lang.String prop, java.lang.String val)
           
static java.lang.String shortName(java.lang.Class clz)
           
static java.lang.String sysprop(java.lang.String prop)
           
static long time()
           
static java.lang.String toHex(int val)
           
static int unsign(byte b)
           
static java.lang.String unURL(java.lang.String url)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

readFile

public static byte[] readFile(java.lang.String filename)
                       throws java.io.IOException
Throws:
java.io.IOException

readFully

public static byte[] readFully(java.io.InputStream is)
                        throws java.io.IOException
Throws:
java.io.IOException

readFully

public static void readFully(java.io.InputStream is,
                             java.io.OutputStream os)
                      throws java.io.IOException
Throws:
java.io.IOException

bound

public static int bound(int min,
                        int max,
                        int val)

toHex

public static java.lang.String toHex(int val)

unsign

public static int unsign(byte b)

safeSleep

public static void safeSleep(int time)

sysprop

public static java.lang.String sysprop(java.lang.String prop)

getProperty

public static java.lang.String getProperty(java.lang.String prop)

setProperty

public static void setProperty(java.lang.String prop,
                               java.lang.String val)

onWindows

public static boolean onWindows()

onWindows98

public static boolean onWindows98()

onMacintosh

public static boolean onMacintosh()

isIBMJDK

public static boolean isIBMJDK()

isSunJDK

public static boolean isSunJDK()

isJDK13

public static boolean isJDK13()

isJDK14

public static boolean isJDK14()

time

public static long time()

shortName

public static java.lang.String shortName(java.lang.Class clz)

nickname

public static java.lang.String nickname(java.lang.Object o)

unURL

public static java.lang.String unURL(java.lang.String url)

setLabelBorder

public static void setLabelBorder(java.lang.String label,
                                  javax.swing.JComponent c)

errorDialog

public static void errorDialog(java.lang.String msg,
                               java.lang.Throwable ex)

confirmDialog

public static boolean confirmDialog(java.lang.String title,
                                    java.lang.String msg)

panelWrap

public static javax.swing.JPanel panelWrap(javax.swing.JComponent c)

decompress

public static int decompress(byte[] src,
                             int src_off,
                             int src_len,
                             byte[] dst,
                             int dst_off,
                             int dst_len)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getInt

public static int getInt(byte[] buf,
                         int off)