|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.page.FontFileLookup
Internal use only. Encapsulates the necessary information related to looking up a particular file. Currently supports opening files by absolute path, path relative to classpath, path relative to servlet context and full URL. Also supports the creation of resource bundles from property files specified by absolute path, path relative to classpath, path relative to servlet context, full URL and URL representing a file.
Field Summary | |
static int |
AFM_FILE
AFM font file. |
static int |
FILE_FULL
File with full (absolute) path. |
static int |
FILE_REL_CLASSPATH
File relative to classpath. |
protected long |
fileLength
Length of the file encapsulated by this object. |
int |
fileType
|
URL |
fileURL
|
String |
location
|
int |
lookupType
Type of file lookup encapsulated by this class. |
static int |
NONE
No type. |
static int |
PROPERTIES_FILE
Resource Bundle properties file. |
String |
propertiesFileName
|
static int |
TTF_FILE
TrueType font file. |
protected com.klg.jclass.page.ttf.TTFFontNames |
ttfFontNames
Stores optional TTFFontNames object containing possible names for TrueType font file. |
static int |
URL_FILE
URL representing a file (note: this does not have to be an URL that begins with "file:", just that the last part of the URL represents a concrete file). |
static int |
URL_STREAM
URL representing a the location of something that returns a byte stream, such as a servlet. |
Constructor Summary | |
FontFileLookup()
Empty constructor. |
|
FontFileLookup(int lookupType,
String location,
int fileType)
Constructor for FILE_FULL and FILE_REL_CLASSPATH lookup types for .afm and .ttf files. |
|
FontFileLookup(int lookupType,
String location,
String name,
int fileType)
Constructor for FILE_FULL and FILE_REL_CLASSPATH lookup types for resource bundle .properties files. |
|
FontFileLookup(int lookupType,
URL fileURL,
int fileType)
Constructor for URL_FILE or URL_STREAM lookup types for .afm and .ttf files. |
|
FontFileLookup(int lookupType,
URL fileURL,
String name,
int fileType)
Constructor for URL_FILE and URL_STREAM lookup types for resource bundle .properties files. |
Method Summary | |
protected static List |
calculateBundleSuffixes(String baseName)
Apply a list of potential suffixes for use in searching for resource bundles (derived from the default locale) to the passed base name. |
boolean |
equals(Object o)
Test equality. |
long |
getFileLength()
Get the length of the file encapsulated by this object. |
ResourceBundle |
getResourceBundle()
Open a resource bundle .properties file based on the information encapsulated by this class. |
com.klg.jclass.page.ttf.TTFFontNames |
getTTFFontNames()
Return optional TTFFontNames object containing possible names for TrueType file. |
InputStream |
openInputStream()
Open an input stream on the file encapsulated by this class. |
void |
setTTFFontNames(com.klg.jclass.page.ttf.TTFFontNames ttfFontNames)
Store optional TTFFontNames object containing possible names for TrueType file. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int FILE_FULL
public static final int URL_FILE
public static final int URL_STREAM
public static final int FILE_REL_CLASSPATH
public static final int AFM_FILE
public static final int TTF_FILE
public static final int PROPERTIES_FILE
public int lookupType
public String location
public String propertiesFileName
public URL fileURL
public int fileType
protected long fileLength
protected com.klg.jclass.page.ttf.TTFFontNames ttfFontNames
Constructor Detail |
public FontFileLookup()
public FontFileLookup(int lookupType, String location, int fileType)
lookupType
- one of FILE_FULL or FILE_REL_CLASSPATH.location
- if FILE_FULL, the absolute path location of the
desired file; if FILE_REL_CLASSPATH, the location
of the desired file relative to the classpath.fileType
- one of AFM_FILE or TTF_FILE.public FontFileLookup(int lookupType, URL fileURL, int fileType)
lookupType
- URL_FILE or URL_STREAM.fileURL
- the location of the desired file specified as an URL object.fileType
- one of AFM_FILE or TTF_FILE.public FontFileLookup(int lookupType, String location, String name, int fileType)
lookupType
- one of FILE_FULL or FILE_REL_CLASSPATH.location
- if FILE_FULL, the absolute path location of the
directory containing the .propertiues file; if
FILE_REL_CLASSPATH, the location of this directory
relative to the classpath.name
- the name portion of the .properties file, the bit before
the locale information or .propeties extension. For example,
a file called "user_en_US.properties" would have a name of
"user".fileType
- PROPERTIES_FILE.public FontFileLookup(int lookupType, URL fileURL, String name, int fileType)
lookupType
- one of URL_FILE or URL_STREAM.fileURL
- if lookupType is URL_FILE, this is an URL specifying the
directory the desired properties file will be found in.
If lookupType is URL_STREAM, this is an URL specifying the
exact location of an entity that returns a byte stream
containing a properties file.name
- if lookupType is URL_FILE, this is the name portion of the
.properties file, the bit before the locale information or
.propeties extension. For example, a file called
"user_en_US.properties" would have a name of "user".
If lookupType is URL_STREAM, this parameter is ignored.fileType
- PROPERTIES_FILE.Method Detail |
public void setTTFFontNames(com.klg.jclass.page.ttf.TTFFontNames ttfFontNames)
public com.klg.jclass.page.ttf.TTFFontNames getTTFFontNames()
public InputStream openInputStream() throws IOException
IOException
public long getFileLength()
public ResourceBundle getResourceBundle() throws IOException
IOException
protected static List calculateBundleSuffixes(String baseName)
baseName
- name of resource bundle before locale information
is added.public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |