jgnash.ui.util
Class TextResource

java.lang.Object
  extended by jgnash.ui.util.TextResource

public class TextResource
extends java.lang.Object

This class is for returning URL's to localized text files.

Version:
$Id$
Author:
Craig Cavanaugh

Field Summary
private static java.lang.String ROOTPATH
           
 
Constructor Summary
private TextResource()
          Contains only static methods
 
Method Summary
private static java.io.InputStream getInputStream(java.lang.String fileName)
          Find a locale specific text file given the file name.
static java.lang.String getString(java.lang.String fileName)
          Find a locale specific text file given the file name.
private static java.lang.String loadConvert(java.lang.String theString)
          Converts encoded \uxxxx to unicode chars and changes special saved chars to their original forms

This was copied from the JDK source code; Properties.java

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOTPATH

private static final java.lang.String ROOTPATH
See Also:
Constant Field Values
Constructor Detail

TextResource

private TextResource()
Contains only static methods

Method Detail

getInputStream

private static java.io.InputStream getInputStream(java.lang.String fileName)
Find a locale specific text file given the file name.

Parameters:
fileName - the file name of the text file to look for.
Returns:
a URL for reading the resource, or null if the resource could not be found

getString

public static java.lang.String getString(java.lang.String fileName)
Find a locale specific text file given the file name. Multiple lines of text are preserved.

Parameters:
fileName - the file name of the text file to look for.
Returns:
a String containing the contents of the file.

loadConvert

private static java.lang.String loadConvert(java.lang.String theString)
Converts encoded \uxxxx to unicode chars and changes special saved chars to their original forms

This was copied from the JDK source code; Properties.java

Parameters:
theString - unicode formatted string
Returns:
string without unicode characters