You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "michael elbaz (JIRA)" <ji...@apache.org> on 2019/07/21 19:54:00 UTC

[jira] [Updated] (CAMEL-13774) Accept an iterator as body for zip

     [ https://issues.apache.org/jira/browse/CAMEL-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

michael elbaz updated CAMEL-13774:
----------------------------------
    Description: 
Accept iterator or Java 8 Stream as body to produce a zip file this will avoid to use the memory for big file (for some use case we can't get an inputStream)

For example it would be very nice to be able to do this:


{code:java}
from("timer:foo?repeatCount=1")
                .setBody(constant(Stream.of("v1", "v2")))
                .setHeader(Exchange.FILE_NAME, constant("report.txt"))
                .marshal().zipFile()
                .to("file:output/directory");
{code}


  was:
Accept iterator or Java 8 Stream as body to produce a zip file this will avoid to use the memory for big file (for some use case we can't get an inputStream)

For example it would be very nice to be able to do this:


{code:java}
from("timer:foo?repeatCount=1")
                .setBody(constant(Stream.of("v1", "v2")))
                .marshal().zipFile()
                .to("file:path?fileName=out.zip");
{code}



> Accept an iterator as body for zip
> ----------------------------------
>
>                 Key: CAMEL-13774
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13774
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-zipfile
>    Affects Versions: 2.24.1, 3.0.0.M4
>            Reporter: michael elbaz
>            Priority: Major
>
> Accept iterator or Java 8 Stream as body to produce a zip file this will avoid to use the memory for big file (for some use case we can't get an inputStream)
> For example it would be very nice to be able to do this:
> {code:java}
> from("timer:foo?repeatCount=1")
>                 .setBody(constant(Stream.of("v1", "v2")))
>                 .setHeader(Exchange.FILE_NAME, constant("report.txt"))
>                 .marshal().zipFile()
>                 .to("file:output/directory");
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)