/** * Copies all nodes from one POIFS to the other * * @param source * is the source POIFS to copy from * @param target * is the target POIFS to copy to */ public static void copyNodes(POIFSFileSystem source, POIFSFileSystem target ) throws IOException { copyNodes( source.getRoot(), target.getRoot() ); }
private void write(POIFSFileSystem fs) throws IOException { // For tracking what we've written out, so far List<String> excepts = new ArrayList<>(2); // Write out our HPFS properties, with any changes writeProperties(fs, excepts); // Copy over everything else unchanged FilteringDirectoryNode src = new FilteringDirectoryNode(getDirectory(), excepts); FilteringDirectoryNode dest = new FilteringDirectoryNode(fs.getRoot(), excepts); EntryUtils.copyNodes(src, dest); // Caller will save the resultant POIFSFileSystem to the stream/file } }
/** * Copies nodes from one POIFS to the other, minus the excepts. * This delegates the filtering work to {@link FilteringDirectoryNode}, * so excepts can be of the form "NodeToExclude" or * "FilteringDirectory/ExcludedChildNode" * * @param source is the source POIFS to copy from * @param target is the target POIFS to copy to * @param excepts is a list of Entry Names to be excluded from the copy */ public static void copyNodes(POIFSFileSystem source, POIFSFileSystem target, List<String> excepts ) throws IOException { copyNodes( new FilteringDirectoryNode(source.getRoot(), excepts), new FilteringDirectoryNode(target.getRoot(), excepts) ); }
EntryUtils.copyNodes( new FilteringDirectoryNode(getDirectory(), excepts) , new FilteringDirectoryNode(fs.getRoot(), excepts)
/** * Copies nodes from one Directory to the other minus the excepts * * @param filteredSource The filtering source Directory to copy from * @param filteredTarget The filtering target Directory to copy to */ public static void copyNodes( FilteringDirectoryNode filteredSource, FilteringDirectoryNode filteredTarget ) throws IOException { // Nothing special here, just overloaded types to make the // recommended new way to handle this clearer copyNodes( (DirectoryEntry)filteredSource, (DirectoryEntry)filteredTarget ); }
/** * Copies nodes from one Directory to the other minus the excepts * * @param filteredSource The filtering source Directory to copy from * @param filteredTarget The filtering target Directory to copy to */ public static void copyNodes( FilteringDirectoryNode filteredSource, FilteringDirectoryNode filteredTarget ) throws IOException { // Nothing special here, just overloaded types to make the // recommended new way to handle this clearer copyNodes( (DirectoryEntry)filteredSource, (DirectoryEntry)filteredTarget ); }
/** * Copies nodes from one POIFS to the other minus the excepts * @param source is the source POIFS to copy from * @param target is the target POIFS to copy to * @param excepts is a list of Strings specifying what nodes NOT to copy */ @Deprecated protected void copyNodes( POIFSFileSystem source, POIFSFileSystem target, List<String> excepts ) throws IOException { EntryUtils.copyNodes( source, target, excepts ); }
/** * Copies nodes from one POIFS to the other minus the excepts * @param source is the source POIFS to copy from * @param target is the target POIFS to copy to * @param excepts is a list of Strings specifying what nodes NOT to copy */ @Deprecated protected void copyNodes( POIFSFileSystem source, POIFSFileSystem target, List<String> excepts ) throws IOException { EntryUtils.copyNodes( source, target, excepts ); }
/** * Copies nodes from one POIFS to the other minus the excepts * @param sourceRoot is the source POIFS to copy from * @param targetRoot is the target POIFS to copy to * @param excepts is a list of Strings specifying what nodes NOT to copy */ @Deprecated protected void copyNodes( DirectoryNode sourceRoot, DirectoryNode targetRoot, List<String> excepts ) throws IOException { EntryUtils.copyNodes( sourceRoot, targetRoot, excepts ); }
/** * Copies nodes from one POIFS to the other minus the excepts * @param sourceRoot is the source POIFS to copy from * @param targetRoot is the target POIFS to copy to * @param excepts is a list of Strings specifying what nodes NOT to copy */ @Deprecated protected void copyNodes( DirectoryNode sourceRoot, DirectoryNode targetRoot, List<String> excepts ) throws IOException { EntryUtils.copyNodes( sourceRoot, targetRoot, excepts ); }
/** * Copies all nodes from one POIFS to the other * * @param source * is the source POIFS to copy from * @param target * is the target POIFS to copy to */ public static void copyNodes( POIFSFileSystem source, POIFSFileSystem target ) throws IOException { copyNodes( source.getRoot(), target.getRoot() ); }
/** * Copies all nodes from one POIFS to the other * * @param source * is the source POIFS to copy from * @param target * is the target POIFS to copy to */ public static void copyNodes(POIFSFileSystem source, POIFSFileSystem target ) throws IOException { copyNodes( source.getRoot(), target.getRoot() ); }
/** * Copies all nodes from one POIFS to the other * * @param source * is the source POIFS to copy from * @param target * is the target POIFS to copy to */ public static void copyNodes( POIFSFileSystem source, POIFSFileSystem target ) throws IOException { copyNodes( source.getRoot(), target.getRoot() ); }
private void write(POIFSFileSystem fs) throws IOException { // For tracking what we've written out, so far List<String> excepts = new ArrayList<>(2); // Write out our HPFS properties, with any changes writeProperties(fs, excepts); // Copy over everything else unchanged FilteringDirectoryNode src = new FilteringDirectoryNode(getDirectory(), excepts); FilteringDirectoryNode dest = new FilteringDirectoryNode(fs.getRoot(), excepts); EntryUtils.copyNodes(src, dest); // Caller will save the resultant POIFSFileSystem to the stream/file } }
/** * Copies nodes from one POIFS to the other, minus the excepts. * This delegates the filtering work to {@link FilteringDirectoryNode}, * so excepts can be of the form "NodeToExclude" or * "FilteringDirectory/ExcludedChildNode" * * @param source is the source POIFS to copy from * @param target is the target POIFS to copy to * @param excepts is a list of Entry Names to be excluded from the copy */ public static void copyNodes(POIFSFileSystem source, POIFSFileSystem target, List<String> excepts ) throws IOException { copyNodes( new FilteringDirectoryNode(source.getRoot(), excepts), new FilteringDirectoryNode(target.getRoot(), excepts) ); }
/** * Copies nodes from one POIFS to the other, minus the excepts. * This delegates the filtering work to {@link FilteringDirectoryNode}, * so excepts can be of the form "NodeToExclude" or * "FilteringDirectory/ExcludedChildNode" * * @param source is the source POIFS to copy from * @param target is the target POIFS to copy to * @param excepts is a list of Entry Names to be excluded from the copy */ public static void copyNodes( POIFSFileSystem source, POIFSFileSystem target, List<String> excepts ) throws IOException { copyNodes( new FilteringDirectoryNode(source.getRoot(), excepts), new FilteringDirectoryNode(target.getRoot(), excepts) ); }
/** * Copies nodes from one POIFS to the other, minus the excepts. * This delegates the filtering work to {@link FilteringDirectoryNode}, * so excepts can be of the form "NodeToExclude" or * "FilteringDirectory/ExcludedChildNode" * * @param source is the source POIFS to copy from * @param target is the target POIFS to copy to * @param excepts is a list of Entry Names to be excluded from the copy */ public static void copyNodes( POIFSFileSystem source, POIFSFileSystem target, List<String> excepts ) throws IOException { copyNodes( new FilteringDirectoryNode(source.getRoot(), excepts), new FilteringDirectoryNode(target.getRoot(), excepts) ); }
EntryUtils.copyNodes( new FilteringDirectoryNode(getDirectory(), excepts) , new FilteringDirectoryNode(fs.getRoot(), excepts)
EntryUtils.copyNodes(getDirectory().getFileSystem(), outFS, writtenEntries);