Package org.apache.nifi.util
Class FlowFilePackagerV1
java.lang.Object
org.apache.nifi.util.FlowFilePackagerV1
- All Implemented Interfaces:
FlowFilePackager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longcopy(InputStream source, OutputStream destination) voidpackageFlowFile(InputStream in, OutputStream out, Map<String, String> attributes, long fileSize) private voidwriteAttributesEntry(Map<String, String> attributes, org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tout) private voidwriteContentEntry(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tarOut, InputStream inStream, long fileSize)
-
Field Details
-
FILENAME_ATTRIBUTES
- See Also:
-
FILENAME_CONTENT
- See Also:
-
DEFAULT_TAR_PERMISSIONS
public static final int DEFAULT_TAR_PERMISSIONS- See Also:
-
tarPermissions
private final int tarPermissions
-
-
Constructor Details
-
FlowFilePackagerV1
public FlowFilePackagerV1() -
FlowFilePackagerV1
public FlowFilePackagerV1(int tarPermissions)
-
-
Method Details
-
packageFlowFile
public void packageFlowFile(InputStream in, OutputStream out, Map<String, String> attributes, long fileSize) throws IOException- Specified by:
packageFlowFilein interfaceFlowFilePackager- Throws:
IOException
-
writeAttributesEntry
private void writeAttributesEntry(Map<String, String> attributes, org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tout) throws IOException- Throws:
IOException
-
writeContentEntry
private void writeContentEntry(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tarOut, InputStream inStream, long fileSize) throws IOException - Throws:
IOException
-
copy
- Throws:
IOException
-