public class Bundle
extends java.lang.Object
name=value
format.BundleManager
Constructor and Description |
---|
Bundle()
Bunble constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getResource(java.lang.String key)
Gets resource by key.
|
void |
load(java.io.InputStream stream)
Loads resources from an input stream.
|
void |
loadFromFile(java.lang.String fileName)
Loads resources from a simple file.
|
void |
loadFromJar(java.lang.String fileName,
java.lang.String entryName)
Loads resources from a file in a jar archive.
|
void |
loadFromZip(java.lang.String fileName,
java.lang.String entryName)
Loads resources from a file in a zip archive.
|
void |
print(java.io.PrintStream stream)
Prints bundle contents.
|
void |
print(java.io.PrintWriter writer)
Prints bundle contents.
|
public void load(java.io.InputStream stream) throws java.io.IOException
stream
- Stream to load resources from.java.io.IOException
public void loadFromFile(java.lang.String fileName) throws java.io.IOException, java.io.FileNotFoundException
fileName
- Name of the file to load resources from.java.io.IOException
java.io.FileNotFoundException
public void loadFromJar(java.lang.String fileName, java.lang.String entryName) throws java.io.IOException, java.io.FileNotFoundException
fileName
- Name of the jar archive.entryName
- ?enryName? Name of the file to load resources from.java.io.IOException
java.io.FileNotFoundException
public void loadFromZip(java.lang.String fileName, java.lang.String entryName) throws java.io.IOException, java.io.FileNotFoundException, java.util.zip.ZipException
fileName
- Name of the zip archive.entryName
- ?enryName? Name of the file to load resources from.java.util.zip.ZipException
java.io.IOException
java.io.FileNotFoundException
public void print(java.io.PrintWriter writer)
writer
- Writer to print data in.public void print(java.io.PrintStream stream)
stream
- Stream to print data in.public java.lang.String getResource(java.lang.String key)
key
- Resource key