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