List of usage examples for org.apache.commons.compress.archivers.cpio CpioConstants FORMAT_NEW
short FORMAT_NEW
To view the source code for org.apache.commons.compress.archivers.cpio CpioConstants FORMAT_NEW.
Click Source Link
From source file:org.eclipse.packagedrone.utils.rpm.build.PayloadRecorder.java
public PayloadRecorder(final boolean autoFinish) throws IOException { this.autoFinish = autoFinish; this.tempFile = Files.createTempFile("rpm-", null); try {//from w w w. j av a2s.co m this.fileStream = new BufferedOutputStream(Files.newOutputStream(this.tempFile, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING)); this.payloadCounter = new CountingOutputStream(this.fileStream); final GZIPOutputStream payloadStream = new GZIPOutputStream(this.payloadCounter); this.archiveCounter = new CountingOutputStream(payloadStream); // setup archive stream this.archiveStream = new CpioArchiveOutputStream(this.archiveCounter, CpioConstants.FORMAT_NEW, 4, "UTF-8"); } catch (final IOException e) { Files.deleteIfExists(this.tempFile); throw e; } }