Class Bundle
java.lang.Object
org.netbeans.jemmy.Bundle
Load string resources from file.
Resources should be stored in
name=value format.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResource(String key) Gets resource by key.voidload(InputStream stream) Loads resources from an input stream.voidloadFromFile(String fileName) Loads resources from a simple file.voidloadFromJar(String fileName, String entryName) Loads resources from a file in a jar archive.voidloadFromZip(String fileName, String entryName) Loads resources from a file in a zip archive.voidprint(PrintStream stream) Prints bundle contents.voidprint(PrintWriter writer) Prints bundle contents.
-
Constructor Details
-
Bundle
public Bundle()Bunble constructor.
-
-
Method Details
-
load
Loads resources from an input stream.- Parameters:
stream- Stream to load resources from.- Throws:
IOException
-
loadFromFile
Loads resources from a simple file.- Parameters:
fileName- Name of the file to load resources from.- Throws:
IOExceptionFileNotFoundException
-
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:
IOExceptionFileNotFoundException
-
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:
ZipExceptionIOExceptionFileNotFoundException
-
print
Prints bundle contents.- Parameters:
writer- Writer to print data in.
-
print
Prints bundle contents.- Parameters:
stream- Stream to print data in.
-
getResource
-