MikeThomsen commented on a change in pull request #4336:
URL: https://github.com/apache/nifi/pull/4336#discussion_r444853167



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
##########
@@ -394,6 +412,65 @@ public void process(final OutputStream out) throws 
IOException {
         }
     }
 
+    private static class SevenZipUnpacker extends Unpacker {
+        public SevenZipUnpacker(Pattern fileFilter) {
+            super(fileFilter);
+        }
+
+        @Override
+        public void unpack(final ProcessSession session, final FlowFile 
source, final List<FlowFile> unpacked) {
+            final String fragmentId = UUID.randomUUID().toString();
+            session.read(source, new InputStreamCallback() {
+                @Override
+                public void process(final InputStream in) throws IOException {
+
+                    int fragmentCount = 0;
+                    byte[] inputData = IOUtils.toByteArray(in);

Review comment:
       I'd have to think about this. I saw an example on google of converting 
an InputStream into the seekablesource (or whatever it's called), but it didn't 
say whether or not the process put it all in memory. We should probably take a 
little time to run that down to see if it's possible to safely wrap an 
InputStream before trying a temp file.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to