public class NodeWriter extends Object
| Constructor and Description |
|---|
NodeWriter(MMBase mmb,
Logger logger,
String directory,
String builderName,
boolean isRelationNode)
Constructor, opens the initial xml file and writes a header.
|
| Modifier and Type | Method and Description |
|---|---|
void |
done()
Writes a footer to the xml file, and closes the file.
|
(package private) static boolean |
saveFile(String filename,
byte[] value)
Stores binary data in a file
|
void |
write(MMObjectNode node)
Writes a node (object) to the datasource file.
|
NodeWriter(MMBase mmb, Logger logger, String directory, String builderName, boolean isRelationNode)
mmb - MMBase object for retrieving type informationlogger - place to log results.directory - the directory to write the files to (including the
trailing slash).buildername - name of the builder to exportisRelationNode - if true, the source to write is a relationsource.
Otherwise, a datasource is written.public void write(MMObjectNode node)
node - The object to store.public void done()
static boolean saveFile(String filename, byte[] value)
filename - path of the file to store the datavalue - binary data to store (byte array)true if the write was succesful, false if an exception occurredMMBase 1.9-SNAPSHOT - ${javadoctimestamp}