Last Updated: 3/4/97
Class NFUtil

Class NFUtil

public class NFUtil extends Object implements NFCompare

Catch all class for various NetFactory utilities.

Methods


final static URL getFileURL (String filename) throws Exception
Returns a URL for the given file. If the filename begins with a protocol, then a URL for that url is returned. If the <filename> begins with a '/' or '\' or 'c:' (any drive letter), then it is assumed to be an absolute pathname, otherwise, it is prepended by the current directory for the application.

static String sprintf (String fmt,
                       Object arg)
Returns a formatted string given the format expression and a single object argument.

static String sprintf (String fmt,
                       Object arg1,
                       Object arg2)
Returns a formatted string given the format expression and two object arguments.

static String sprintf (String fmt,
                       Object arg1,
                       Object arg2,
                       Object arg3)
Returns a formatted string given the format expression and three object arguments.

static String sprintf (String fmt,
                       Object arg1,
                       Object arg2,
                       Object arg3,
                       Object arg4)
Returns a formatted string given the format expression and four object arguments.

static String sprintf (String fmt,
                       Object arg1,
                       Object arg2,
                       Object arg3,
                       Object arg4,
                       Object arg5)
Returns a formatted string given the format expression and five object arguments.

static String sprintf (String fmt,
                       Object arg[])
Returns a formatted string using the given format expression and the array of objects. The following types are supported:
 	%s	= accepts any Object and converts it to a string
 	%d	= accepts any Number, prints only the integer value
 	%f	= accepts any Number, prints a decimal value
 	%g	= accepts any Number, prints it using the standard
 		  representation for the local system
For any format type, the following modifiers are supported:
 	-0WW.DD
where all parts are optional and are interpretted as follows:
 	-	= left justify the result, otherwise right justify
 	0	= zero fill (number formats only)
 	WW	= total width of formatted field. If the field is
 		  naturally wider than this value, it is ignored.
 	DD	= number of decimal digits (%f format only).  The
 		  default number is 2.