}
public void store(final XReference ref) throws IOException {
assert ref != null;
Marshaller marshaller = getMarshaller(ref);
File file = getFile(ref);
mkdirs(file);
if (log.isTraceEnabled()) {
log.trace("Marshalling reference: {} to file: {}", OID.get(ref), file);
}
Writer writer = new BufferedWriter(new FileWriter(file));
try {
marshaller.marshal(ref.get(), writer);
}
finally {
Closer.close(writer);
}
}