Package org.netbeans.jemmy
Class Bundle
- java.lang.Object
-
- org.netbeans.jemmy.Bundle
-
public class Bundle extends Object
Load string resources from file. Resources should be stored inname=value
format.- 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 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.
-
-
-
Method Detail
-
load
public void load(InputStream stream) throws IOException
Loads resources from an input stream.- Parameters:
stream
- Stream to load resources from.- Throws:
IOException
-
loadFromFile
public void loadFromFile(String fileName) throws IOException, FileNotFoundException
Loads resources from a simple file.- Parameters:
fileName
- Name of the file to load resources from.- Throws:
IOException
FileNotFoundException
-
loadFromJar
public void loadFromJar(String fileName, String entryName) throws IOException, FileNotFoundException
Loads 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:
IOException
FileNotFoundException
-
loadFromZip
public void loadFromZip(String fileName, String entryName) throws IOException, FileNotFoundException, ZipException
Loads 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:
ZipException
IOException
FileNotFoundException
-
print
public void print(PrintWriter writer)
Prints bundle contents.- Parameters:
writer
- Writer to print data in.
-
print
public void print(PrintStream stream)
Prints bundle contents.- Parameters:
stream
- Stream to print data in.
-
-