2008-09-10 1.1.0

org.eclipse.soda.dk.nls
Class Nls

java.lang.Object
  extended by org.eclipse.soda.dk.nls.Nls

public class Nls
extends java.lang.Object

Version:
1.1.0

Field Summary
protected static char[] CR
          Define the cr (char[]) constant.
protected static char[] END_START_LINE_CHARS
          Define the end start line chars (char[]) constant.
static char[] HEX_CHAR_LOWER_TABLE
          Define the hex char lower table (char[]) constant.
static char[] HEX_CHAR_UPPER_TABLE
          Define the hex char upper table (char[]) constant.
static byte[] HEX_UPPER_TABLE
          Define the hex upper table (byte[]) constant.
protected static char[] LF
          Define the lf (char[]) constant.
protected static char[] LIST_CHARS
          Define the list chars (char[]) constant.
protected static char[] OBJECT_ARRAY_CHARS
          Define the object array chars (char[]) constant.
protected static char[] OPEN_TIME
          Define the open time (char[]) constant.
protected static char[] TAB
          Define the tab (char[]) constant.
static int TIMESTAMP_DAY_FORMAT
          Define the timestamp day format (int) constant.
static int TIMESTAMP_HOUR_FORMAT
          Define the timestamp hour format (int) constant.
static int TIMESTAMP_MILLISECOND_FORMAT
          Define the timestamp millisecond format (int) constant.
static int TIMESTAMP_MINUTE_FORMAT
          Define the timestamp minute format (int) constant.
static int TIMESTAMP_MONTH_FORMAT
          Define the timestamp month format (int) constant.
static int TIMESTAMP_SECOND_FORMAT
          Define the timestamp second format (int) constant.
static int TIMESTAMP_YEAR_FORMAT
          Define the timestamp year format (int) constant.
 
Constructor Summary
Nls()
          Constructor for Nls.
 
Method Summary
static int append(char[] characters, int index, char[] data)
          Append with the specified characters, index and data parameters and return the int result.
static int append(char[] characters, int index, int data)
          Append with the specified characters, index and data parameters and return the int result.
static int append(char[] characters, int index, java.lang.String data)
          Append with the specified characters, index and data parameters and return the int result.
static java.lang.String format(java.lang.String pattern, java.lang.Object object)
          Format with the specified pattern and object parameters and return the String result.
static java.lang.String format(java.lang.String pattern, java.lang.Object[] objects)
          Format with the specified pattern and objects parameters and return the String result.
static java.lang.String formatAsciiBytes(byte[] bytes, int index, int length)
          Format ascii bytes with the specified bytes, index and length parameters and return the String result.
static void formatAsciiBytes(byte[] bytes, int index, int length, java.lang.StringBuffer buffer)
          Format ascii bytes with the specified bytes, index, length and buffer parameters.
static java.lang.String formatData(java.lang.Object data)
          Format data with the specified data parameter and return the String result.
static void formatData(java.lang.StringBuffer buffer, java.lang.Object data)
          The formatData will format the data values to a nice string.
static void formatData(java.lang.StringBuffer buffer, java.lang.Object data, int depth)
          Format data with the specified buffer, data and depth parameters.
static void formatData(java.lang.StringBuffer buffer, java.lang.Object data, int depth, int maxLineSize)
          Format data with the specified buffer, data, depth and max line size parameters.
static void formatData(java.lang.StringBuffer buffer, java.lang.Object data, int depth, int maxLineSize, int verboseLevel)
          Format data with the specified buffer, data, depth, max line size and verbose level parameters.
static java.lang.String formatHexBytes(byte[] bytes, int index, int length)
          Format hex bytes with the specified bytes, index and length parameters and return the String result.
static void formatHexBytes(byte[] bytes, int index, int length, java.lang.StringBuffer buffer)
           
static void formatHexBytesOnly(byte[] bytes, int index, int length, java.lang.StringBuffer buffer)
          Format hex bytes only with the specified bytes, index, length and buffer parameters.
static void formatStringData(java.lang.StringBuffer buffer, java.lang.Object data)
          Format string data with the specified buffer and data parameters.
static java.lang.String formatTimestamp(long timestamp)
          Format timestamp with the specified timestamp parameter and return the String result.
static java.lang.String formatTimestamp(long timestamp, int format)
          Format timestamp with the specified timestamp and format parameters and return the String result.
static java.lang.String formatTimestamp(java.lang.Object timestampObject)
           
static java.lang.String formatTimestampNew(long timestamp, int format)
          Format timestamp new with the specified timestamp and format parameters and return the String result.
static java.lang.String getName(java.lang.Class aclass, java.lang.String name, java.lang.String extension)
           
static java.lang.String[] getNlsAdditions()
          Gets the nls additions (String[]) value.
static java.util.Hashtable getProperties(java.lang.Class aclass, java.lang.String name)
          Get properties with the specified aclass and name parameters and return the Hashtable result.
static java.util.ResourceBundle getResourceBundle(java.lang.Class resourceBaseClass)
          Get resource bundle with the specified resource base class parameter and return the ResourceBundle result.
static java.util.ResourceBundle getResourceBundle(java.lang.String name)
          Get resource bundle with the specified name parameter and return the value.
static java.net.URL getUrl(java.lang.Class aclass, java.lang.String name, java.lang.String extension)
           
static byte[] parseCompressedHexString(java.lang.String string)
          Parse compressed hex string with the specified string parameter and return the byte[] result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMESTAMP_MILLISECOND_FORMAT

public static final int TIMESTAMP_MILLISECOND_FORMAT
Define the timestamp millisecond format (int) constant.

See Also:
Constant Field Values

TIMESTAMP_SECOND_FORMAT

public static final int TIMESTAMP_SECOND_FORMAT
Define the timestamp second format (int) constant.

See Also:
Constant Field Values

TIMESTAMP_MINUTE_FORMAT

public static final int TIMESTAMP_MINUTE_FORMAT
Define the timestamp minute format (int) constant.

See Also:
Constant Field Values

TIMESTAMP_HOUR_FORMAT

public static final int TIMESTAMP_HOUR_FORMAT
Define the timestamp hour format (int) constant.

See Also:
Constant Field Values

TIMESTAMP_DAY_FORMAT

public static final int TIMESTAMP_DAY_FORMAT
Define the timestamp day format (int) constant.

See Also:
Constant Field Values

TIMESTAMP_MONTH_FORMAT

public static final int TIMESTAMP_MONTH_FORMAT
Define the timestamp month format (int) constant.

See Also:
Constant Field Values

TIMESTAMP_YEAR_FORMAT

public static final int TIMESTAMP_YEAR_FORMAT
Define the timestamp year format (int) constant.

See Also:
Constant Field Values

HEX_UPPER_TABLE

public static final byte[] HEX_UPPER_TABLE
Define the hex upper table (byte[]) constant.


HEX_CHAR_LOWER_TABLE

public static final char[] HEX_CHAR_LOWER_TABLE
Define the hex char lower table (char[]) constant.


HEX_CHAR_UPPER_TABLE

public static final char[] HEX_CHAR_UPPER_TABLE
Define the hex char upper table (char[]) constant.


CR

protected static final char[] CR
Define the cr (char[]) constant.


LF

protected static final char[] LF
Define the lf (char[]) constant.


TAB

protected static final char[] TAB
Define the tab (char[]) constant.


OPEN_TIME

protected static final char[] OPEN_TIME
Define the open time (char[]) constant.


OBJECT_ARRAY_CHARS

protected static final char[] OBJECT_ARRAY_CHARS
Define the object array chars (char[]) constant.


END_START_LINE_CHARS

protected static final char[] END_START_LINE_CHARS
Define the end start line chars (char[]) constant.


LIST_CHARS

protected static final char[] LIST_CHARS
Define the list chars (char[]) constant.

Constructor Detail

Nls

public Nls()
Constructor for Nls.

Method Detail

append

public static final int append(char[] characters,
                               int index,
                               char[] data)
Append with the specified characters, index and data parameters and return the int result.

Parameters:
characters - The characters (char[]) parameter.
index - The index (int) parameter.
data - The data (char[]) parameter.
Returns:
Results of the append (int) value.
See Also:
append(char[],int,int), append(char[],int,String)

append

public static final int append(char[] characters,
                               int index,
                               int data)
Append with the specified characters, index and data parameters and return the int result.

Parameters:
characters - The characters (char[]) parameter.
index - The index (int) parameter.
data - The data (int) parameter.
Returns:
Results of the append (int) value.
See Also:
append(char[],int,char[]), append(char[],int,String)

append

public static final int append(char[] characters,
                               int index,
                               java.lang.String data)
Append with the specified characters, index and data parameters and return the int result.

Parameters:
characters - The characters (char[]) parameter.
index - The index (int) parameter.
data - The data (String) parameter.
Returns:
Results of the append (int) value.
See Also:
append(char[],int,char[]), append(char[],int,int)

format

public static java.lang.String format(java.lang.String pattern,
                                      java.lang.Object object)
Format with the specified pattern and object parameters and return the String result. The pattern (String) parameter. The

Parameters:
pattern - The pattern (String) parameter.
object - The object (Object) parameter.
Returns:
Results of the format (String) value.
See Also:
format(String,Object[])

format

public static java.lang.String format(java.lang.String pattern,
                                      java.lang.Object[] objects)
Format with the specified pattern and objects parameters and return the String result. The pattern (String) parameter. The

Parameters:
pattern - The pattern (String) parameter.
objects - The objects (Object[]) parameter.
Returns:
Results of the format (String) value.
See Also:
format(String,Object)

formatAsciiBytes

public static java.lang.String formatAsciiBytes(byte[] bytes,
                                                int index,
                                                int length)
Format ascii bytes with the specified bytes, index and length parameters and return the String result. The bytes (byte[]) parameter. The index (int) parameter. The length (int) parameter. value.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
length - The length (int) parameter.
Returns:
Results of the format ascii bytes (String)
See Also:
formatAsciiBytes(byte[],int,int,StringBuffer)

formatAsciiBytes

public static void formatAsciiBytes(byte[] bytes,
                                    int index,
                                    int length,
                                    java.lang.StringBuffer buffer)
Format ascii bytes with the specified bytes, index, length and buffer parameters. The bytes (byte[]) parameter. The index (int) parameter. The length (int) parameter. The buffer (StringBuffer) parameter.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
length - The length (int) parameter.
buffer - The buffer (StringBuffer) parameter.
See Also:
formatAsciiBytes(byte[],int,int)

formatData

public static java.lang.String formatData(java.lang.Object data)
Format data with the specified data parameter and return the String result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the format data (String) value.
See Also:
formatData(StringBuffer,Object), formatData(StringBuffer,Object,int), formatData(StringBuffer,Object,int,int), formatData(StringBuffer,Object,int,int,int), formatStringData(StringBuffer,Object)

formatData

public static void formatData(java.lang.StringBuffer buffer,
                              java.lang.Object data)
The formatData will format the data values to a nice string. The buffer (StringBuffer)

Parameters:
buffer - The buffer (StringBuffer) parameter.
data - The data (Object) parameter.
See Also:
formatData(Object), formatData(StringBuffer,Object,int), formatData(StringBuffer,Object,int,int), formatData(StringBuffer,Object,int,int,int), formatStringData(StringBuffer,Object)

formatData

public static void formatData(java.lang.StringBuffer buffer,
                              java.lang.Object data,
                              int depth)
Format data with the specified buffer, data and depth parameters.

Parameters:
buffer - The buffer (StringBuffer) parameter.
data - The data (Object) parameter.
depth - The depth (int) parameter.
See Also:
formatData(Object), formatData(StringBuffer,Object), formatData(StringBuffer,Object,int,int), formatData(StringBuffer,Object,int,int,int), formatStringData(StringBuffer,Object)

formatData

public static void formatData(java.lang.StringBuffer buffer,
                              java.lang.Object data,
                              int depth,
                              int maxLineSize)
Format data with the specified buffer, data, depth and max line size parameters.

Parameters:
buffer - The buffer (StringBuffer) parameter.
data - The data (Object) parameter.
depth - The depth (int) parameter.
maxLineSize - The max line size (int) parameter.
See Also:
formatData(Object), formatData(StringBuffer,Object), formatData(StringBuffer,Object,int), formatData(StringBuffer,Object,int,int,int), formatStringData(StringBuffer,Object)

formatData

public static void formatData(java.lang.StringBuffer buffer,
                              java.lang.Object data,
                              int depth,
                              int maxLineSize,
                              int verboseLevel)
Format data with the specified buffer, data, depth, max line size and verbose level parameters.

Parameters:
buffer - The buffer (StringBuffer) parameter.
data - The data (Object) parameter.
depth - The depth (int) parameter.
maxLineSize - The max line size (int) parameter.
verboseLevel - The verbose level (int) parameter.
See Also:
formatData(Object), formatData(StringBuffer,Object), formatData(StringBuffer,Object,int), formatData(StringBuffer,Object,int,int), formatStringData(StringBuffer,Object)

formatHexBytes

public static java.lang.String formatHexBytes(byte[] bytes,
                                              int index,
                                              int length)
Format hex bytes with the specified bytes, index and length parameters and return the String result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
length - The length (int) parameter.
Returns:
Results of the format hex bytes (String) value.
See Also:
formatHexBytes(byte[],int,int,StringBuffer)

formatHexBytes

public static void formatHexBytes(byte[] bytes,
                                  int index,
                                  int length,
                                  java.lang.StringBuffer buffer)
Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
length - The length (int) parameter.
buffer - The buffer (StringBuffer) parameter.
See Also:
formatHexBytes(byte[],int,int)

formatHexBytesOnly

public static void formatHexBytesOnly(byte[] bytes,
                                      int index,
                                      int length,
                                      java.lang.StringBuffer buffer)
Format hex bytes only with the specified bytes, index, length and buffer parameters.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
length - The length (int) parameter.
buffer - The buffer (StringBuffer) parameter.

formatStringData

public static void formatStringData(java.lang.StringBuffer buffer,
                                    java.lang.Object data)
Format string data with the specified buffer and data parameters.

Parameters:
buffer - The buffer (StringBuffer) parameter.
data - The data (Object) parameter.

formatTimestamp

public static java.lang.String formatTimestamp(long timestamp)
Format timestamp with the specified timestamp parameter and return the String result.

Parameters:
timestamp - The timestamp (long) parameter.
Returns:
Results of the format timestamp (String) value.
See Also:
formatTimestamp(long,int), formatTimestamp(Object)

formatTimestamp

public static java.lang.String formatTimestamp(long timestamp,
                                               int format)
Format timestamp with the specified timestamp and format parameters and return the String result.

Parameters:
timestamp - The timestamp (long) parameter.
format - The format (int) parameter.
Returns:
Results of the format timestamp (String) value.
See Also:
formatTimestamp(long), formatTimestamp(Object)

formatTimestamp

public static java.lang.String formatTimestamp(java.lang.Object timestampObject)
Parameters:
timestampObject - The timestamp object (Object) parameter.
Returns:
Results of the format timestamp (String) value.
See Also:
formatTimestamp(long), formatTimestamp(long,int)

formatTimestampNew

public static java.lang.String formatTimestampNew(long timestamp,
                                                  int format)
Format timestamp new with the specified timestamp and format parameters and return the String result.

Parameters:
timestamp - The timestamp (long) parameter.
format - The format (int) parameter.
Returns:
Results of the format timestamp new (String) value.

getName

public static java.lang.String getName(java.lang.Class aclass,
                                       java.lang.String name,
                                       java.lang.String extension)
Parameters:
aclass - The aclass (Class) parameter.
name - The name (String) parameter.
extension - The extension (String) parameter.
Returns:
Results of the get name (String) value.

getNlsAdditions

public static java.lang.String[] getNlsAdditions()
Gets the nls additions (String[]) value.

Returns:
The nls additions (String[]) value.

getProperties

public static java.util.Hashtable getProperties(java.lang.Class aclass,
                                                java.lang.String name)
Get properties with the specified aclass and name parameters and return the Hashtable result. The aclass (Class) parameter. The

Parameters:
aclass - The aclass (Class) parameter.
name - The name (String) parameter.
Returns:
Results of the get properties (Hashtable) value.

getResourceBundle

public static java.util.ResourceBundle getResourceBundle(java.lang.Class resourceBaseClass)
Get resource bundle with the specified resource base class parameter and return the ResourceBundle result. The resource base class (Class) parameter. value.

Parameters:
resourceBaseClass - The resource base class (Class) parameter.
Returns:
Results of the get resource bundle (ResourceBundle)
See Also:
getResourceBundle(String)

getResourceBundle

public static java.util.ResourceBundle getResourceBundle(java.lang.String name)
Get resource bundle with the specified name parameter and return the value.

Parameters:
name - The name (String) parameter.
Returns:
Results of the get resource bundle (ResourceBundle)
See Also:
getResourceBundle(Class)

getUrl

public static java.net.URL getUrl(java.lang.Class aclass,
                                  java.lang.String name,
                                  java.lang.String extension)
Parameters:
aclass - The aclass (Class) parameter.
name - The name (String) parameter.
extension - The extension (String) parameter.
Returns:
Results of the get url (URL) value.

parseCompressedHexString

public static byte[] parseCompressedHexString(java.lang.String string)
Parse compressed hex string with the specified string parameter and return the byte[] result.

Parameters:
string - The string (String) parameter.
Returns:
Results of the parse compressed hex string (byte[]) value.

2008-09-10 1.1.0

Copyright (c) 1999, 2008 IBM and others. See license in Legal section. OSGi Framework Version 3.4.0.v20080605-1900