com.netscape.cmsutil.util
Class Utils

java.lang.Object
  extended by com.netscape.cmsutil.util.Utils

public class Utils
extends java.lang.Object


Constructor Summary
Utils()
           
 
Method Summary
static boolean byteArraysAreEqual(byte[] a, byte[] b)
          compares contents two byte arrays returning true if exactly same.
static void checkHost(java.lang.String hostname)
           
static void copy(java.lang.String orig, java.lang.String dest)
           
static void copyStream(java.io.BufferedReader in, java.io.OutputStreamWriter out)
           
static void copyStream(java.io.InputStream in, java.io.OutputStream out)
           
static boolean exec(java.lang.String cmd)
           
static java.lang.String[] getStringArrayFromVector(java.util.Vector v)
          returns an array of strings from a vector of Strings there'll be trouble if the Vector contains something other than just Strings
static boolean isNT()
          Checks if this is NT.
static java.lang.String lsDateStr(java.util.Date date)
           
static void sortStrings(java.lang.String[] strings)
           
static byte[] SpecialDecode(java.lang.String s)
           
static java.lang.String SpecialEncode(byte[] data)
           
static java.lang.String SpecialURLDecode(java.lang.String s)
           
static java.lang.String stripQuotes(java.lang.String s)
          strips out double quotes around String parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

isNT

public static boolean isNT()
Checks if this is NT.


exec

public static boolean exec(java.lang.String cmd)

SpecialURLDecode

public static java.lang.String SpecialURLDecode(java.lang.String s)

SpecialDecode

public static byte[] SpecialDecode(java.lang.String s)

SpecialEncode

public static java.lang.String SpecialEncode(byte[] data)

checkHost

public static void checkHost(java.lang.String hostname)
                      throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

copy

public static void copy(java.lang.String orig,
                        java.lang.String dest)

copyStream

public static void copyStream(java.io.InputStream in,
                              java.io.OutputStream out)
                       throws java.io.IOException
Throws:
java.io.IOException

copyStream

public static void copyStream(java.io.BufferedReader in,
                              java.io.OutputStreamWriter out)
                       throws java.io.IOException
Throws:
java.io.IOException

sortStrings

public static void sortStrings(java.lang.String[] strings)

lsDateStr

public static java.lang.String lsDateStr(java.util.Date date)

byteArraysAreEqual

public static boolean byteArraysAreEqual(byte[] a,
                                         byte[] b)
compares contents two byte arrays returning true if exactly same.


stripQuotes

public static java.lang.String stripQuotes(java.lang.String s)
strips out double quotes around String parameter

Parameters:
s - the string potentially bracketed with double quotes
Returns:
string stripped of surrounding double quotes

getStringArrayFromVector

public static java.lang.String[] getStringArrayFromVector(java.util.Vector v)
returns an array of strings from a vector of Strings there'll be trouble if the Vector contains something other than just Strings