X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fapplication%2FProjectInserter.java;h=7c7c89c108ebfe5ad6596e3eda433a9277dc6f53;hb=00f27e897343477574139a11bf5c4200fc868702;hp=7f64b65dc0613e46e9357c54752e0df3de64c57d;hpb=76c0336dba1b21104b99cd1be7ebc9930d39d8a3;p=jSite.git diff --git a/src/de/todesbaum/jsite/application/ProjectInserter.java b/src/de/todesbaum/jsite/application/ProjectInserter.java index 7f64b65..7c7c89c 100644 --- a/src/de/todesbaum/jsite/application/ProjectInserter.java +++ b/src/de/todesbaum/jsite/application/ProjectInserter.java @@ -1,5 +1,5 @@ /* - * jSite - ProjectInserter.java - Copyright © 2006–2011 David Roden + * jSite - ProjectInserter.java - Copyright © 2006–2012 David Roden * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,8 +28,8 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.Map.Entry; +import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -90,6 +90,9 @@ public class ProjectInserter implements FileScannerListener, Runnable { /** Progress listener for payload transfers. */ private ProgressListener progressListener; + /** Whether to use “early encode.” */ + private boolean useEarlyEncode; + /** * Adds a listener to the list of registered listeners. * @@ -216,6 +219,17 @@ public class ProjectInserter implements FileScannerListener, Runnable { } /** + * Sets whether to use the “early encode“ flag for the insert. + * + * @param useEarlyEncode + * {@code true} to set the “early encode” flag for the insert, + * {@code false} otherwise + */ + public void setUseEarlyEncode(boolean useEarlyEncode) { + this.useEarlyEncode = useEarlyEncode; + } + + /** * Starts the insert. * * @param progressListener @@ -405,7 +419,7 @@ public class ProjectInserter implements FileScannerListener, Runnable { } putDir.setVerbosity(Verbosity.ALL); putDir.setMaxRetries(-1); - putDir.setEarlyEncode(false); + putDir.setEarlyEncode(useEarlyEncode); putDir.setManifestPutter(ManifestPutter.DEFAULT); for (ScannedFile file : files) { FileEntry fileEntry = createFileEntry(file, edition);