You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2009/07/30 14:19:14 UTC

[jira] Created: (JCR-2235) Set binary property data using OutputStream

Set binary property data using OutputStream
-------------------------------------------

                 Key: JCR-2235
                 URL: https://issues.apache.org/jira/browse/JCR-2235
             Project: Jackrabbit Content Repository
          Issue Type: New Feature
          Components: jackrabbit-jcr-commons
            Reporter: Marcel Reutegger


This is a helper class that allows to write binary data into an output stream which is piped into an input stream that can be provided to the methods Node.setProperty(String, InputStream), ValueFactory.createBinary(InputStream) or Property.setValue(InputStream).

This class may help to avoid creating a temporary file that contains the data that will be set. Instead of streaming the data from a temp file, the data can be written directly into the repository.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-2235) Set binary property data using OutputStream

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738237#action_12738237 ] 

Jukka Zitting commented on JCR-2235:
------------------------------------

Do you have a use case for this? The implementation of PipedStream.write() would still need some source from which it reads the data that then gets written to the OutputStream. Wouldn't it be simpler to use an InputStream wrapper for that source? The only case I can think of where an extra thread is needed is with event-based systems like SAX.

This also seems like something that would fit better in a general-purpose library like Commons IO.

> Set binary property data using OutputStream
> -------------------------------------------
>
>                 Key: JCR-2235
>                 URL: https://issues.apache.org/jira/browse/JCR-2235
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>            Reporter: Marcel Reutegger
>         Attachments: JCR-2235.patch
>
>
> This is a helper class that allows to write binary data into an output stream which is piped into an input stream that can be provided to the methods Node.setProperty(String, InputStream), ValueFactory.createBinary(InputStream) or Property.setValue(InputStream).
> This class may help to avoid creating a temporary file that contains the data that will be set. Instead of streaming the data from a temp file, the data can be written directly into the repository.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-2235) Set binary property data using OutputStream

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger updated JCR-2235:
----------------------------------

    Attachment: JCR-2235.patch

> Set binary property data using OutputStream
> -------------------------------------------
>
>                 Key: JCR-2235
>                 URL: https://issues.apache.org/jira/browse/JCR-2235
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>            Reporter: Marcel Reutegger
>         Attachments: JCR-2235.patch
>
>
> This is a helper class that allows to write binary data into an output stream which is piped into an input stream that can be provided to the methods Node.setProperty(String, InputStream), ValueFactory.createBinary(InputStream) or Property.setValue(InputStream).
> This class may help to avoid creating a temporary file that contains the data that will be set. Instead of streaming the data from a temp file, the data can be written directly into the repository.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-2235) Set binary property data using OutputStream

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger updated JCR-2235:
----------------------------------

    Status: Patch Available  (was: Open)

> Set binary property data using OutputStream
> -------------------------------------------
>
>                 Key: JCR-2235
>                 URL: https://issues.apache.org/jira/browse/JCR-2235
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>            Reporter: Marcel Reutegger
>         Attachments: JCR-2235.patch
>
>
> This is a helper class that allows to write binary data into an output stream which is piped into an input stream that can be provided to the methods Node.setProperty(String, InputStream), ValueFactory.createBinary(InputStream) or Property.setValue(InputStream).
> This class may help to avoid creating a temporary file that contains the data that will be set. Instead of streaming the data from a temp file, the data can be written directly into the repository.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.