Package org.netbeans.jemmy
Class Bundle
- java.lang.Object
-
- org.netbeans.jemmy.Bundle
-
public class Bundle extends java.lang.ObjectLoad string resources from file. Resources should be stored inname=valueformat.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
BundleManager
-
-
Constructor Summary
Constructors Constructor Description Bundle()Bunble constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetResource(java.lang.String key)Gets resource by key.voidload(java.io.InputStream stream)Loads resources from an input stream.voidloadFromFile(java.lang.String fileName)Loads resources from a simple file.voidloadFromJar(java.lang.String fileName, java.lang.String entryName)Loads resources from a file in a jar archive.voidloadFromZip(java.lang.String fileName, java.lang.String entryName)Loads resources from a file in a zip archive.voidprint(java.io.PrintStream stream)Prints bundle contents.voidprint(java.io.PrintWriter writer)Prints bundle contents.
-
-
-
Method Detail
-
load
public void load(java.io.InputStream stream) throws java.io.IOExceptionLoads resources from an input stream.- Parameters:
stream- Stream to load resources from.- Throws:
java.io.IOException
-
loadFromFile
public void loadFromFile(java.lang.String fileName) throws java.io.IOException, java.io.FileNotFoundExceptionLoads resources from a simple file.- Parameters:
fileName- Name of the file to load resources from.- Throws:
java.io.IOExceptionjava.io.FileNotFoundException
-
loadFromJar
public void loadFromJar(java.lang.String fileName, java.lang.String entryName) throws java.io.IOException, java.io.FileNotFoundExceptionLoads resources from a file in a jar archive.- Parameters:
fileName- Name of the jar archive.entryName- ?enryName? Name of the file to load resources from.- Throws:
java.io.IOExceptionjava.io.FileNotFoundException
-
loadFromZip
public void loadFromZip(java.lang.String fileName, java.lang.String entryName) throws java.io.IOException, java.io.FileNotFoundException, java.util.zip.ZipExceptionLoads resources from a file in a zip archive.- Parameters:
fileName- Name of the zip archive.entryName- ?enryName? Name of the file to load resources from.- Throws:
java.util.zip.ZipExceptionjava.io.IOExceptionjava.io.FileNotFoundException
-
print
public void print(java.io.PrintWriter writer)
Prints bundle contents.- Parameters:
writer- Writer to print data in.
-
print
public void print(java.io.PrintStream stream)
Prints bundle contents.- Parameters:
stream- Stream to print data in.
-
getResource
public java.lang.String getResource(java.lang.String key)
Gets resource by key.- Parameters:
key- Resource key- Returns:
- Resource value or null if resource was not found.
-
-