@Override
public void close() throws IOException {
if (directory != null) {
- if (directory.getNFileSystem() != null) {
- directory.getNFileSystem().close();
+ if (directory.getFileSystem() != null) {
+ directory.getFileSystem().close();
clearDirectory();
}
}
return _nfilesystem;
}
-
- /**
- * If this is NPOIFS based, return the NPOIFSFileSystem
- * that this belong to, otherwise Null if OPOIFS based
- * @return the filesystem that this belongs to
- */
- public POIFSFileSystem getNFileSystem()
- {
- return _nfilesystem;
- }
-
/**
* open a document in the directory's entry's list of entries
*
DocumentProperty property = (DocumentProperty)doc.getProperty();
_document = new POIFSDocument(
property,
- ((DirectoryNode)doc.getParent()).getNFileSystem()
+ ((DirectoryNode)doc.getParent()).getFileSystem()
);
_data = _document.getBlockIterator();
}
*/
public POIFSDocument(DocumentNode document) {
this((DocumentProperty)document.getProperty(),
- ((DirectoryNode)document.getParent()).getNFileSystem());
+ ((DirectoryNode)document.getParent()).getFileSystem());
}
/**
try (POIFSFileSystem npoifs = new POIFSFileSystem(sample)) {
// Ensure we have what we expect on the root
- assertEquals(npoifs, npoifs.getRoot().getNFileSystem());
assertEquals(npoifs, npoifs.getRoot().getFileSystem());
// Check inside
// Copy over
EntryUtils.copyNodes(root, dest);
- // Re-load, always as NPOIFS
+ // Re-load
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- root.getNFileSystem().writeFilesystem(baos);
+ root.getFileSystem().writeFilesystem(baos);
POIFSFileSystem read = new POIFSFileSystem(
new ByteArrayInputStream(baos.toByteArray()));