ariba.util.core
Class Fmt

java.lang.Object
  extended by ariba.util.core.Fmt

public class Fmt
extends Object

Formatted output. Like printf, except the only directives are

%% -- print a single %

%/ -- print a java.io.File.separator

%[-][0][nn][.mm]s -- toString and print the next argument If the argument if fewer than NN characters, it is padded to NN characters. Padding is on the left if the directive starts with '-', otherwise it is on the right. Fields are padded with spaces, unless the optional '0' (zero) character is given, in which case the string is padded with zeros. There is no way to specify another pad character. If the argument has more than MM characters, it is truncated to MM characters. If NN is not given, there is no padding. If MM is not given, there is no truncation.


Field Summary
static String EscapedSingleQuoteString
           
static Object[] NoMore
           
static Object Null
           
static char SingleQuoteChar
           
static String SingleQuoteString
           
 
Method Summary
static void B(FormatBuffer buf, String control)
          Format a message into a FormatBuffer.
static void B(FormatBuffer buf, String control, Object a1)
          Format a message into a FormatBuffer.
static void B(FormatBuffer buf, String control, Object[] args)
          Format a message into a FormatBuffer.
static void B(FormatBuffer buf, String control, Object a1, Object a2)
          Format a message into a FormatBuffer.
static void B(FormatBuffer buf, String control, Object a1, Object a2, Object a3)
          Format a message into a FormatBuffer.
static void B(FormatBuffer buf, String control, Object a1, Object a2, Object a3, Object a4)
          Format a message into a FormatBuffer.
static void B(FormatBuffer buf, String control, Object a1, Object a2, Object a3, Object a4, Object a5)
          Format a message into a FormatBuffer.
static void B(FormatBuffer buf, String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
          Format a message into a FormatBuffer.
static void B(FormatBuffer buf, String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object[] more)
          Deprecated. use B(FormatBuffer, control, Object[])
static void Bq(FormatBuffer buffer, String control, Object... args)
          Vararg-based format function based on Fmt.B but escaping every string argument in the list
static String escapeSingleQuote(String value)
           
static void F(PrintWriter out, String control)
          Format a message into a PrintWriter.
static void F(PrintWriter out, String control, int i1)
          Format a message into a PrintWriter.
static void F(PrintWriter out, String control, Object a1)
          Format a message into a PrintWriter.
static void F(PrintWriter out, String control, Object[] args)
          Format a message into a PrintWriter.
static void F(PrintWriter out, String control, Object a1, Object a2)
          Format a message into a PrintWriter.
static void F(PrintWriter out, String control, Object a1, Object a2, Object a3)
          Format a message into a PrintWriter.
static void F(PrintWriter out, String control, Object a1, Object a2, Object a3, Object a4)
          Format a message into a PrintWriter.
static void F(PrintWriter out, String control, Object a1, Object a2, Object a3, Object a4, Object a5)
          Format a message into a PrintWriter.
static void F(PrintWriter out, String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
          Format a message into a PrintWriter.
static void F(PrintWriter out, String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object[] more)
          Deprecated. use F(PrintWriter, String, Object[])
static void freeBuffer(FormatBuffer buf)
           
static FormatBuffer getBuffer()
           
static void O(OutputStream out, String control)
          Format a message into an OutputStream.
static void O(OutputStream out, String control, Object a1)
          Format a message into an OutputStream.
static void O(OutputStream out, String control, Object[] args)
          Format a message into an OutputStream.
static void O(OutputStream out, String control, Object a1, Object a2)
          Format a message into an OutputStream.
static void O(OutputStream out, String control, Object a1, Object a2, Object a3)
          Format a message into an OutputStream.
static void O(OutputStream out, String control, Object a1, Object a2, Object a3, Object a4)
          Format a message into an OutputStream.
static void O(OutputStream out, String control, Object a1, Object a2, Object a3, Object a4, Object a5)
          Format a message into an OutputStream.
static void O(OutputStream out, String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
          Format a message into an OutputStream.
static void O(OutputStream out, String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object[] more)
          Deprecated. use O(OutputStream, String, Object[])
static String S(String control)
          Format a message into a String.
static String S(String control, int i1)
          Format a message into a String.
static String S(String control, Object a1)
          Format a message into a String.
static String S(String control, Object[] args)
          Format a message into a String.
static String S(String control, Object a1, Object a2)
          Format a message into a String.
static String S(String control, Object a1, Object a2, Object a3)
          Format a message into a String.
static String S(String control, Object a1, Object a2, Object a3, Object a4)
          Format a message into a String.
static String S(String control, Object a1, Object a2, Object a3, Object a4, Object a5)
          Format a message into a String.
static String S(String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
          Format a message into a String.
static String S(String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object[] more)
          Deprecated. use S(String, Object[])
static String safeEscapeSingleQuote(String value)
          Safe escape for single quotes, without doubling up on the escape.
static String Si(String control, List vectorArgs)
          An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.
static String Si(String control, Object a1)
          An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.
static String Si(String control, Object[] args)
          An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.
static String Si(String control, Object a1, Object a2)
          An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.
static String Si(String control, Object a1, Object a2, Object a3)
          An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.
static String Si(String control, Object a1, Object a2, Object a3, Object a4)
          An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.
static String Si(String control, Object a1, Object a2, Object a3, Object a4, Object a5)
          An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.
static String Si(String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
          An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.
static String Si(String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object[] more)
          Deprecated. use Si(String, Object[])
static String Sil(Locale locale, String stringTable, String key)
          An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.
static String Sil(Locale locale, String stringTable, String key, List vectorArgs)
          An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.
static String Sil(Locale locale, String stringTable, String key, Object a1)
          An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.
static String Sil(Locale locale, String stringTable, String key, Object[] args)
          An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.
static String Sil(Locale locale, String stringTable, String key, Object a1, Object a2)
          An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.
static String Sil(Locale locale, String stringTable, String key, Object a1, Object a2, Object a3)
          An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.
static String Sil(Locale locale, String stringTable, String key, Object a1, Object a2, Object a3, Object a4)
          An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.
static String Sil(Locale locale, String stringTable, String key, Object a1, Object a2, Object a3, Object a4, Object a5)
          An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.
static String Sil(Locale locale, String stringTable, String key, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
          An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.
static String Sil(Locale locale, String stringTable, String key, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object[] more)
          Deprecated. use Sil(Locale, String, String, Object[])
static String Sil(String stringTable, String key)
          Deprecated. use ariba.util.core.ResourceService.getString(String, String)
static String Sil(String stringTable, String key, List vectorArgs)
          An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.
static String Sil(String stringTable, String key, Object a1)
          An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.
static String Sil(String stringTable, String key, Object[] args)
          An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.
static String Sil(String stringTable, String key, Object a1, Object a2)
          An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.
static String Sil(String stringTable, String key, Object a1, Object a2, Object a3)
          An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.
static String Sil(String stringTable, String key, Object a1, Object a2, Object a3, Object a4)
          An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.
static String Sil(String stringTable, String key, Object a1, Object a2, Object a3, Object a4, Object a5)
          An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.
static String Sil(String stringTable, String key, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
          An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.
static String Sil(String stringTable, String key, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object[] more)
          Deprecated. use Sil(String, String, Object[])
static String singleQuote(String value)
          In our codebase AQL queries are constructed using Fmt.S where a string value from a UI could be used to generate the query.
static String Sq(String control, Object... args)
          Vararg-based format function based on Fmt.S but escaping every string argument in the list
static void W(Writer out, String control)
          Formats a message onto a Writer.
static void W(Writer out, String control, Object a1)
          Formats a message onto a Writer.
static void W(Writer out, String control, Object[] args)
          Formats a message onto a Writer.
static void W(Writer out, String control, Object a1, Object a2)
          Formats a message onto a Writer.
static void W(Writer out, String control, Object a1, Object a2, Object a3)
          Formats a message onto a Writer.
static void W(Writer out, String control, Object a1, Object a2, Object a3, Object a4)
          Formats a message onto a Writer.
static void W(Writer out, String control, Object a1, Object a2, Object a3, Object a4, Object a5)
          Formats a message onto a Writer.
static void W(Writer out, String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
          Formats a message onto a Writer.
static void W(Writer out, String control, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object[] more)
          Deprecated. use W(Writer, String, Object[])
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Null

public static final Object Null

NoMore

public static final Object[] NoMore

SingleQuoteChar

public static final char SingleQuoteChar
See Also:
Constant Field Values

SingleQuoteString

public static final String SingleQuoteString
See Also:
Constant Field Values

EscapedSingleQuoteString

public static final String EscapedSingleQuoteString
See Also:
Constant Field Values
Method Detail

getBuffer

public static FormatBuffer getBuffer()

freeBuffer

public static void freeBuffer(FormatBuffer buf)

S

public static String S(String control)
Format a message into a String.

Parameters:
control - a String defining the format of the output
Returns:
the formatted String

S

public static String S(String control,
                       Object a1)
Format a message into a String.

Parameters:
control - a String defining the format of the output
a1 - the first argument to the format string control
Returns:
the formatted String

S

public static String S(String control,
                       int i1)
Format a message into a String.

Parameters:
control - a String defining the format of the output
i1 - an integer argument to the format string control
Returns:
the formatted String

S

public static String S(String control,
                       Object a1,
                       Object a2)
Format a message into a String.

Parameters:
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
Returns:
the formatted String

S

public static String S(String control,
                       Object a1,
                       Object a2,
                       Object a3)
Format a message into a String.

Parameters:
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
Returns:
the formatted String

S

public static String S(String control,
                       Object a1,
                       Object a2,
                       Object a3,
                       Object a4)
Format a message into a String.

Parameters:
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
Returns:
the formatted String

S

public static String S(String control,
                       Object a1,
                       Object a2,
                       Object a3,
                       Object a4,
                       Object a5)
Format a message into a String.

Parameters:
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
Returns:
the formatted String

S

public static String S(String control,
                       Object a1,
                       Object a2,
                       Object a3,
                       Object a4,
                       Object a5,
                       Object a6)
Format a message into a String.

Parameters:
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control
Returns:
the formatted String

S

public static String S(String control,
                       Object a1,
                       Object a2,
                       Object a3,
                       Object a4,
                       Object a5,
                       Object a6,
                       Object[] more)
Deprecated. use S(String, Object[])

Format a message into a String.

Parameters:
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control
more - an array containing all subsequent arguments to the format string control after the sixth one.
Returns:
the formatted String

S

public static String S(String control,
                       Object[] args)
Format a message into a String.

Parameters:
control - a String defining the format of the output
args - an array containing all arguments to the format string control
Returns:
the formatted String

F

public static void F(PrintWriter out,
                     String control)
Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output

F

public static void F(PrintWriter out,
                     String control,
                     Object a1)
Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control

F

public static void F(PrintWriter out,
                     String control,
                     int i1)
Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output
i1 - an integer argument to the format string control

F

public static void F(PrintWriter out,
                     String control,
                     Object a1,
                     Object a2)
Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control

F

public static void F(PrintWriter out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3)
Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control

F

public static void F(PrintWriter out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4)
Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control

F

public static void F(PrintWriter out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5)
Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control

F

public static void F(PrintWriter out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5,
                     Object a6)
Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control

F

public static void F(PrintWriter out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5,
                     Object a6,
                     Object[] more)
Deprecated. use F(PrintWriter, String, Object[])

Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control
more - an array containing all subsequent arguments to the format string control after the sixth one.

F

public static void F(PrintWriter out,
                     String control,
                     Object[] args)
Format a message into a PrintWriter.

Parameters:
out - a PrintWriter to format the output into
control - a String defining the format of the output
args - an array containing all arguments to the format string control

O

public static void O(OutputStream out,
                     String control)
              throws IOException
Format a message into an OutputStream.

Parameters:
out - an OutputStream to format the output into
control - a String defining the format of the output
Throws:
IOException - if there is a problem writing to the OutputStream.

O

public static void O(OutputStream out,
                     String control,
                     Object a1)
              throws IOException
Format a message into an OutputStream.

Parameters:
out - an OutputStream to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
Throws:
IOException - if there is a problem writing to the OutputStream.

O

public static void O(OutputStream out,
                     String control,
                     Object a1,
                     Object a2)
              throws IOException
Format a message into an OutputStream.

Parameters:
out - an OutputStream to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
Throws:
IOException - if there is a problem writing to the OutputStream.

O

public static void O(OutputStream out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3)
              throws IOException
Format a message into an OutputStream.

Parameters:
out - an OutputStream to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
Throws:
IOException - if there is a problem writing to the OutputStream.

O

public static void O(OutputStream out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4)
              throws IOException
Format a message into an OutputStream.

Parameters:
out - an OutputStream to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
Throws:
IOException - if there is a problem writing to the OutputStream.

O

public static void O(OutputStream out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5)
              throws IOException
Format a message into an OutputStream.

Parameters:
out - an OutputStream to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
Throws:
IOException - if there is a problem writing to the OutputStream.

O

public static void O(OutputStream out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5,
                     Object a6)
              throws IOException
Format a message into an OutputStream.

Parameters:
out - an OutputStream to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control
Throws:
IOException - if there is a problem writing to the OutputStream.

O

public static void O(OutputStream out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5,
                     Object a6,
                     Object[] more)
              throws IOException
Deprecated. use O(OutputStream, String, Object[])

Format a message into an OutputStream.

Parameters:
out - an OutputStream to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control
more - an array containing all subsequent arguments to the format string control after the sixth one.
Throws:
IOException - if there is a problem writing to the OutputStream.

O

public static void O(OutputStream out,
                     String control,
                     Object[] args)
              throws IOException
Format a message into an OutputStream.

Parameters:
out - an OutputStream to format the output into
control - a String defining the format of the output
args - an array containing all arguments to the format string control
Throws:
IOException - if there is a problem writing to the OutputStream.

W

public static void W(Writer out,
                     String control)
              throws IOException
Formats a message onto a Writer.

Parameters:
out - a Writer to format the output into
control - a String defining the format of the output
Throws:
IOException - if there is a problem writing to the Writer.

W

public static void W(Writer out,
                     String control,
                     Object a1)
              throws IOException
Formats a message onto a Writer.

Parameters:
out - a Writer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
Throws:
IOException - if there is a problem writing to the Writer.

W

public static void W(Writer out,
                     String control,
                     Object a1,
                     Object a2)
              throws IOException
Formats a message onto a Writer.

Parameters:
out - a Writer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
Throws:
IOException - if there is a problem writing to the Writer.

W

public static void W(Writer out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3)
              throws IOException
Formats a message onto a Writer.

Parameters:
out - a Writer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
Throws:
IOException - if there is a problem writing to the Writer.

W

public static void W(Writer out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4)
              throws IOException
Formats a message onto a Writer.

Parameters:
out - a Writer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
Throws:
IOException - if there is a problem writing to the Writer.

W

public static void W(Writer out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5)
              throws IOException
Formats a message onto a Writer.

Parameters:
out - a Writer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
Throws:
IOException - if there is a problem writing to the Writer.

W

public static void W(Writer out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5,
                     Object a6)
              throws IOException
Formats a message onto a Writer.

Parameters:
out - a Writer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control
Throws:
IOException - if there is a problem writing to the Writer.

W

public static void W(Writer out,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5,
                     Object a6,
                     Object[] more)
              throws IOException
Deprecated. use W(Writer, String, Object[])

Formats a message onto a Writer.

Parameters:
out - a Writer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control
more - an array containing all subsequent arguments to the format string control after the sixth one.
Throws:
IOException - if there is a problem writing to the Writer.

W

public static void W(Writer out,
                     String control,
                     Object[] args)
              throws IOException
Formats a message onto a Writer.

Parameters:
out - a Writer to format the output into
control - a String defining the format of the output
args - an array containing all arguments to the format string control
Throws:
IOException - if there is a problem writing to the Writer.

B

public static void B(FormatBuffer buf,
                     String control)
Format a message into a FormatBuffer.

Parameters:
buf - a FormatBuffer to format the output into
control - a String defining the format of the output

B

public static void B(FormatBuffer buf,
                     String control,
                     Object a1)
Format a message into a FormatBuffer.

Parameters:
buf - a FormatBuffer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control

B

public static void B(FormatBuffer buf,
                     String control,
                     Object a1,
                     Object a2)
Format a message into a FormatBuffer.

Parameters:
buf - a FormatBuffer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control

B

public static void B(FormatBuffer buf,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3)
Format a message into a FormatBuffer.

Parameters:
buf - a FormatBuffer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control

B

public static void B(FormatBuffer buf,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4)
Format a message into a FormatBuffer.

Parameters:
buf - a FormatBuffer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control

B

public static void B(FormatBuffer buf,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5)
Format a message into a FormatBuffer.

Parameters:
buf - a FormatBuffer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control

B

public static void B(FormatBuffer buf,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5,
                     Object a6)
Format a message into a FormatBuffer.

Parameters:
buf - a FormatBuffer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control

B

public static void B(FormatBuffer buf,
                     String control,
                     Object a1,
                     Object a2,
                     Object a3,
                     Object a4,
                     Object a5,
                     Object a6,
                     Object[] more)
Deprecated. use B(FormatBuffer, control, Object[])

Format a message into a FormatBuffer.

Parameters:
buf - a FormatBuffer to format the output into
control - a String defining the format of the output
a1 - the first argument to the format string control
a2 - the second argument to the format string control
a3 - the third argument to the format string control
a4 - the fourth argument to the format string control
a5 - the fifth argument to the format string control
a6 - the sixth argument to the format string control
more - an array containing all subsequent arguments to the format string control after the sixth one.

B

public static void B(FormatBuffer buf,
                     String control,
                     Object[] args)
Format a message into a FormatBuffer.

Parameters:
buf - a FormatBuffer to format the output into
control - a String defining the format of the output
args - an array containing all arguments to the format string control after the sixth one

Sil

public static String Sil(String stringTable,
                         String key)
Deprecated. use ariba.util.core.ResourceService.getString(String, String)

An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Since using MessageFormat without any substitute arguments is not useful, this method is deprecated and ResourceService.getString(String, String) should be used instead.

Because there are no substitution values in the string, translators may not be aware that they should use MessageFormat conventions and they may or may not do so. This could cause lose of single-quotes because a single-quote is an escape character to MessageFormat. This method tries to detect strings that are in MessageFormat conventions. If a "''" (two single-quotes) or a "{" are present, the string is format with MessageFormat. Otherwise, the string is returned without formatting.

Parameters:
stringTable - resource string table
key - resource key
Returns:
pattern with formatted objects.

Sil

public static String Sil(String stringTable,
                         String key,
                         Object a1)
An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Parameters:
stringTable - resource string table
key - resource key
a1 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(String stringTable,
                         String key,
                         Object a1,
                         Object a2)
An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Parameters:
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3)
An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Parameters:
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3,
                         Object a4)
An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Parameters:
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3,
                         Object a4,
                         Object a5)
An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Parameters:
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
a5 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3,
                         Object a4,
                         Object a5,
                         Object a6)
An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Parameters:
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
a5 - object to be substituted
a6 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3,
                         Object a4,
                         Object a5,
                         Object a6,
                         Object[] more)
Deprecated. use Sil(String, String, Object[])

An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Parameters:
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
a5 - object to be substituted
a6 - object to be substituted
more - object array for more arguments
Returns:
pattern with formatted objects.

Sil

public static String Sil(String stringTable,
                         String key,
                         List vectorArgs)
An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Parameters:
stringTable - resource string table
key - resource key
vectorArgs - object arguments to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(String stringTable,
                         String key,
                         Object[] args)
An internationalized version of Fmt.S that gets the control string from the specified string table and does a java.text.MessageFormat style position independent formatting.

Parameters:
stringTable - resource string table
key - resource key, cannot be null
args - object arguments to be substituted
Returns:
pattern with formatted objects.
See Also:
Si(String, Object[])

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key)
An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
Returns:
pattern with formatted objects.

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key,
                         Object a1)
An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
a1 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key,
                         Object a1,
                         Object a2)
An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3)
An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3,
                         Object a4)
An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3,
                         Object a4,
                         Object a5)
An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
a5 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3,
                         Object a4,
                         Object a5,
                         Object a6)
An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
a5 - object to be substituted
a6 - object to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key,
                         Object a1,
                         Object a2,
                         Object a3,
                         Object a4,
                         Object a5,
                         Object a6,
                         Object[] more)
Deprecated. use Sil(Locale, String, String, Object[])

An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
a5 - object to be substituted
a6 - object to be substituted
more - object array for more arguments
Returns:
pattern with formatted objects.

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key,
                         List vectorArgs)
An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
vectorArgs - object arguments to be substituted
Returns:
pattern with formatted objects.

Sil

public static String Sil(Locale locale,
                         String stringTable,
                         String key,
                         Object[] args)
An internationalized version of Fmt.S that gets the control string from the specified string table for the specified locale and does a java.text.MessageFormat style position independent formatting.

Parameters:
locale - locale to be used
stringTable - resource string table
key - resource key
args - object arguments to be substituted
Returns:
pattern with formatted objects.

Si

public static String Si(String control,
                        Object a1)
An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.

Parameters:
control - MessageFormat style pattern
a1 - object to be substituted
Returns:
pattern with formatted objects.

Si

public static String Si(String control,
                        Object a1,
                        Object a2)
An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.

Parameters:
control - MessageFormat style pattern
a1 - object to be substituted
a2 - object to be substituted
Returns:
pattern with formatted objects.

Si

public static String Si(String control,
                        Object a1,
                        Object a2,
                        Object a3)
An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.

Parameters:
control - MessageFormat style pattern
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
Returns:
pattern with formatted objects.

Si

public static String Si(String control,
                        Object a1,
                        Object a2,
                        Object a3,
                        Object a4)
An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.

Parameters:
control - MessageFormat style pattern
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
Returns:
pattern with formatted objects.

Si

public static String Si(String control,
                        Object a1,
                        Object a2,
                        Object a3,
                        Object a4,
                        Object a5)
An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.

Parameters:
control - MessageFormat style pattern
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
a5 - object to be substituted
Returns:
pattern with formatted objects.

Si

public static String Si(String control,
                        Object a1,
                        Object a2,
                        Object a3,
                        Object a4,
                        Object a5,
                        Object a6)
An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.

Parameters:
control - MessageFormat style pattern
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
a5 - object to be substituted
a6 - object to be substituted
Returns:
pattern with formatted objects.

Si

public static String Si(String control,
                        Object a1,
                        Object a2,
                        Object a3,
                        Object a4,
                        Object a5,
                        Object a6,
                        Object[] more)
Deprecated. use Si(String, Object[])

An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.

Parameters:
control - MessageFormat style pattern
a1 - object to be substituted
a2 - object to be substituted
a3 - object to be substituted
a4 - object to be substituted
a5 - object to be substituted
a6 - object to be substituted
more - array of objects for additional substitutions
Returns:
pattern with formatted objects.

Si

public static String Si(String control,
                        List vectorArgs)
An internationalized version of Fmt.S uses the java.text.MessageFormat style control string.

Parameters:
control - MessageFormat style pattern
vectorArgs - object arguments to be substituted
Returns:
pattern with formatted objects.

Si

public static String Si(String control,
                        Object[] args)
An internationalized version of Fmt.S uses the java.text.MessageFormat style control string. This is just a wrapper around MessageFormat's format(String, Object[]) method.

Parameters:
control - MessageFormat style pattern
args - object arguments to be substituted
Returns:
pattern with formatted objects.
See Also:
MessageFormat.format(String, Object[])

Sq

public static String Sq(String control,
                        Object... args)
Vararg-based format function based on Fmt.S but escaping every string argument in the list

Parameters:
control - control string determining format of the output
args - varargs list of arguments
Returns:
formatted string with string parameters being single quote escaped

Bq

public static void Bq(FormatBuffer buffer,
                      String control,
                      Object... args)
Vararg-based format function based on Fmt.B but escaping every string argument in the list

Parameters:
buffer - FormatBuffer into which the formatted string is output
control - control string determining format of the output
args - varargs list of arguments

escapeSingleQuote

public static String escapeSingleQuote(String value)
Parameters:
value - a string whose single quotes need escaping.
Returns:
the given string value with internal single quotes doubled.

safeEscapeSingleQuote

public static String safeEscapeSingleQuote(String value)
Safe escape for single quotes, without doubling up on the escape. This is not intended to prevent AQL injection, but NOT necessarily provide correctness. All it ensures is that ANY quote character shows up in doubles. If you know the string has not been escaped, use escapeSingleQuote instead.


singleQuote

public static String singleQuote(String value)
In our codebase AQL queries are constructed using Fmt.S where a string value from a UI could be used to generate the query. Unless this value is quoted, SQL could be injected into the AQL. This convenience method could be used to prevent such an occurrence.

Parameters:
value - the un-quoted string value
Returns:
the quoted string value. The single quotes inside value are also escaped.


AribaWeb User Interface Development Framework
Copyright © 2000-2009 Ariba, Inc. All Rights Reserved.