// Update the byte array with the latest data
generateData();
// Write out
ByteArrayInputStream bais = new ByteArrayInputStream(data);
dir.createDocument(path[path.length-1], bais);
}
/**
* Called just before writing out, to trigger
* the data byte array to be updated with the