nl.justobjects.pushlet.util
Class Sys

java.lang.Object
  extended by nl.justobjects.pushlet.util.Sys

public class Sys
extends java.lang.Object

Utilities that interact with the underlying OS/JVM.

Version:
$Id: Sys.java,v 1.4 2007/11/10 14:17:18 justb Exp $
Author:
Just van den Broecke

Constructor Summary
Sys()
           
 
Method Summary
static java.lang.String forHTMLTag(java.lang.String aTagFragment)
          Replace characters having special meaning inside HTML tags with their escaped equivalents, using character entities such as '&'.
static java.util.Properties loadPropertiesFile(java.lang.String aFilePath)
          Load properties file from file path.
static java.util.Properties loadPropertiesResource(java.lang.String aResourcePath)
          Load properties file from classpath.
static long now()
          Shorthand for current time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sys

public Sys()
Method Detail

forHTMLTag

public static java.lang.String forHTMLTag(java.lang.String aTagFragment)
Replace characters having special meaning inside HTML tags with their escaped equivalents, using character entities such as '&'.

The escaped characters are :

This method ensures that arbitrary text appearing inside a tag does not "confuse" the tag. For example, HREF='Blah.do?Page=1&Sort=ASC' does not comply with strict HTML because of the ampersand, and should be changed to HREF='Blah.do?Page=1&Sort=ASC'. This is commonly seen in building query strings. (In JSTL, the c:url tag performs this task automatically.)


loadPropertiesResource

public static java.util.Properties loadPropertiesResource(java.lang.String aResourcePath)
                                                   throws java.io.IOException
Load properties file from classpath.

Throws:
java.io.IOException

loadPropertiesFile

public static java.util.Properties loadPropertiesFile(java.lang.String aFilePath)
                                               throws java.io.IOException
Load properties file from file path.

Throws:
java.io.IOException

now

public static long now()
Shorthand for current time.



Copyright 2000-2003 - Just Objects B.V.