Package org.eclipse.packager.rpm.build
Class PayloadRecorder
java.lang.Object
org.eclipse.packager.rpm.build.PayloadRecorder
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic class -
Constructor Summary
ConstructorsConstructorDescriptionPayloadRecorder(PayloadCoding payloadCoding, String payloadFlags, DigestAlgorithm fileDigestAlgorithm, List<PayloadProcessor> processors) -
Method Summary
Modifier and TypeMethodDescriptionaddDirectory(String targetPath, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) addFile(String targetPath, InputStream stream) addFile(String targetPath, InputStream stream, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) addFile(String targetPath, ByteBuffer data) addFile(String targetPath, ByteBuffer data, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) addFile(String targetPath, Path path, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) addSymbolicLink(String targetPath, String linkTo, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) voidclose()finish()Stop recording payload data
-
Constructor Details
-
PayloadRecorder
- Throws:
IOException
-
PayloadRecorder
public PayloadRecorder(PayloadCoding payloadCoding, String payloadFlags, DigestAlgorithm fileDigestAlgorithm, List<PayloadProcessor> processors) throws IOException - Throws:
IOException
-
-
Method Details
-
addFile
- Throws:
IOException
-
addFile
public PayloadRecorder.Result addFile(String targetPath, Path path, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) throws IOException - Throws:
IOException
-
addFile
- Throws:
IOException
-
addFile
public PayloadRecorder.Result addFile(String targetPath, ByteBuffer data, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) throws IOException - Throws:
IOException
-
addFile
- Throws:
IOException
-
addFile
public PayloadRecorder.Result addFile(String targetPath, InputStream stream, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) throws IOException - Throws:
IOException
-
addDirectory
public PayloadRecorder.Result addDirectory(String targetPath, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) throws IOException - Throws:
IOException
-
addSymbolicLink
public PayloadRecorder.Result addSymbolicLink(String targetPath, String linkTo, Consumer<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry> customizer) throws IOException - Throws:
IOException
-
finish
Stop recording payload dataIf the recorder is already finished it will throw an
IllegalStateException.- Returns:
- The additional headers, as generated by the payload processors.
- Throws:
IOException- in case of IO errorsIllegalStateException- in case the finish was already called
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-