remove trivial factory method
import java.nio.channels.SeekableByteChannel;
import java.nio.file.StandardOpenOption;
import org.apache.commons.compress.archivers.ArchiveException;
-import org.apache.commons.compress.archivers.ArchiveOutputStream;
import org.apache.commons.compress.archivers.ArchiveStreamFactory;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
* @since 1.17
*/
public class ArchiveSinks {
- /**
- * Wraps an ArchiveOutputStream.
- */
- public static Sink<File> forStream(ArchiveOutputStream os) {
- return new FileToArchiveSink(os);
- }
-
/**
* Uses {@link ArchiveFactory#createArchiveOutputStream}.
*
if (!prefersSeekableByteChannel(format)) {
return forStream(format, Channels.newOutputStream(c));
} else if (ArchiveStreamFactory.ZIP.equalsIgnoreCase(format)) {
- return forStream(new ZipArchiveOutputStream(c));
+ return new FileToArchiveSink(new ZipArchiveOutputStream(c));
} else if (ArchiveStreamFactory.SEVEN_Z.equalsIgnoreCase(format)) {
return new SevenZOutputFileSink(c);
} else {
