public ClassID getStorageClsid() { return directory.getStorageClsid(); }
/** * Copies an Entry into a target POIFS directory, recursively */ @Internal public static void copyNodeRecursively( Entry entry, DirectoryEntry target ) throws IOException { if ( entry.isDirectoryEntry() ) { DirectoryEntry dirEntry = (DirectoryEntry)entry; DirectoryEntry newTarget = target.createDirectory( entry.getName() ); newTarget.setStorageClsid( dirEntry.getStorageClsid() ); Iterator<Entry> entries = dirEntry.getEntries(); while ( entries.hasNext() ) { copyNodeRecursively( entries.next(), newTarget ); } } else { DocumentEntry dentry = (DocumentEntry) entry; DocumentInputStream dstream = new DocumentInputStream( dentry ); target.createDocument( dentry.getName(), dstream ); dstream.close(); } }
public ClassID getStorageClsid() { return directory.getStorageClsid(); }
public ClassID getStorageClsid() { return directory.getStorageClsid(); }
public ClassID getStorageClsid() { return directory.getStorageClsid(); }
return; handleEmbeddedResource(stream, null, dir.getName(), dir.getStorageClsid(), type.toString(), xhtml, true); return; if (dir.getStorageClsid() != null) { metadata.set(TikaCoreProperties.EMBEDDED_STORAGE_CLASS_ID, dir.getStorageClsid().toString());
protected void sanitize(BleachSession session, DirectoryEntry rootIn, DirectoryEntry rootOut) { LOGGER.debug("Entries before: {}", rootIn.getEntryNames()); // Save the changes to a new file // Returns false if the entry should be removed Predicate<Entry> visitor = ((Predicate<Entry>) (e -> true)) .and(new MacroRemover(session)) .and(new ObjectRemover(session)) .and(new SummaryInformationSanitiser(session)); LOGGER.debug("Root ClassID: {}", rootIn.getStorageClsid()); // https://blogs.msdn.microsoft.com/heaths/2006/02/27/identifying-windows-installer-file-types/ rootOut.setStorageClsid(rootIn.getStorageClsid()); rootIn .getEntries() .forEachRemaining( entry -> { if (!visitor.test(entry)) { return; } copyNodesRecursively(session, entry, rootOut); }); LOGGER.debug("Entries after: {}", rootOut.getEntryNames()); // Save the changes to a new file }
public static void dump(DirectoryEntry root) throws IOException { System.out.println(root.getName()+" : storage CLSID "+root.getStorageClsid()); for(Iterator it = root.getEntries(); it.hasNext();){ Entry entry = (Entry)it.next();
newTarget.setStorageClsid(dirEntry.getStorageClsid());
public static void dump(DirectoryEntry root) throws IOException { System.out.println(root.getName()+" : storage CLSID "+root.getStorageClsid()); for(Iterator it = root.getEntries(); it.hasNext();){ Entry entry = (Entry)it.next();
/** * Copies an Entry into a target POIFS directory, recursively */ @Internal public static void copyNodeRecursively( Entry entry, DirectoryEntry target ) throws IOException { if ( entry.isDirectoryEntry() ) { DirectoryEntry dirEntry = (DirectoryEntry)entry; DirectoryEntry newTarget = target.createDirectory( entry.getName() ); newTarget.setStorageClsid( dirEntry.getStorageClsid() ); Iterator<Entry> entries = dirEntry.getEntries(); while ( entries.hasNext() ) { copyNodeRecursively( entries.next(), newTarget ); } } else { DocumentEntry dentry = (DocumentEntry) entry; DocumentInputStream dstream = new DocumentInputStream( dentry ); target.createDocument( dentry.getName(), dstream ); dstream.close(); } }
return; handleEmbeddedResource(stream, null, dir.getName(), dir.getStorageClsid(), type.toString(), xhtml, true); return; if (dir.getStorageClsid() != null) { metadata.set(Metadata.EMBEDDED_STORAGE_CLASS_ID, dir.getStorageClsid().toString());
return; handleEmbeddedResource(stream, null, dir.getName(), dir.getStorageClsid(), type.toString(), xhtml, true); return; if (dir.getStorageClsid() != null) { metadata.set(Metadata.EMBEDDED_STORAGE_CLASS_ID, dir.getStorageClsid().toString());