org.dbforms.util
Class Util

java.lang.Object
  extended by org.dbforms.util.Util

public class Util
extends Object

Simple general utility class


Constructor Summary
Util()
           
 
Method Summary
static String decode(String s, String enc)
          Decodes a string
static String encode(String s, String enc)
          Encode a string with desired character encoding.
static String getBaseURL(HttpServletRequest request)
           
static boolean getFalse(String value)
          DOCUMENT ME!
static String getPattern(Format f)
          DOCUMENT ME!
static String getRequestURL(HttpServletRequest request)
           
static boolean getTrue(String value)
          DOCUMENT ME!
static boolean isNull(String s)
          Test if the input string is null or empty (does not contain any character)
static String sprintf(String format, Object[] o)
          returns a formated string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

isNull

public static final boolean isNull(String s)
Test if the input string is null or empty (does not contain any character)

Parameters:
s - the string value to test
Returns:
true if the input string is null or empty, false otherwise

decode

public static final String decode(String s,
                                  String enc)
                           throws UnsupportedEncodingException
Decodes a string

Parameters:
s - the string to encode
Returns:
the encoded string
Throws:
UnsupportedEncodingException

encode

public static final String encode(String s,
                                  String enc)
                           throws UnsupportedEncodingException
Encode a string with desired character encoding.

Parameters:
s - the string to encode
enc - the desired encoding
Returns:
the encoded string
Throws:
UnsupportedEncodingException - DOCUMENT ME!

getFalse

public static boolean getFalse(String value)
DOCUMENT ME!

Parameters:
value - DOCUMENT ME!
Returns:
DOCUMENT ME!

getPattern

public static String getPattern(Format f)
DOCUMENT ME!

Parameters:
f - DOCUMENT ME!
Returns:
DOCUMENT ME!

getTrue

public static boolean getTrue(String value)
DOCUMENT ME!

Parameters:
value - DOCUMENT ME!
Returns:
DOCUMENT ME!

sprintf

public static String sprintf(String format,
                             Object[] o)
returns a formated string

Parameters:
format - format string
o - objects to use to format
Returns:
String

getBaseURL

public static String getBaseURL(HttpServletRequest request)

getRequestURL

public static String getRequestURL(HttpServletRequest request)


Copyright © 2002-2006 DbForms. All Rights Reserved.