[ 
https://issues.apache.org/jira/browse/COMPRESS-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16046024#comment-16046024
 ] 

ASF GitHub Bot commented on COMPRESS-405:
-----------------------------------------

GitHub user sesuncedu opened a pull request:

    https://github.com/apache/commons-compress/pull/28

    COMPRESS-405 Create Fixed Length Block OutputStream / WriteableByteChannel

    
    This PR provides a new class that is an OutputStream and 
WritableByteChannel, and which supports writing to a destination output stream 
or byte channel in fixed size blocks. Internally, all writes are made using NIO.
    If the destination is a  FileOutputStream the existing channel is used.
    Other OutputStreams are wrapped with a custom channel implementation which 
does not attempt to split writes into chunks.
    
    If the target channel fails to write the entire buffer in a single call, an 
exception is thrown,
    
    Incoming data is accumulated in a ByteBuffer until a complete block is 
ready, then written to the target.
    If  WritableByteChannel::write(ByteBuffer)  method is called, the code will 
attempt to avoid copying data into the buffer if the buffer is empty, and a 
complete block is available.
    
    **The class and UnitTest are in compress/utils . This is a MINOR change - 
thus the version number for the package should be increated to 1.15.0**
    
    Signed-off-by: Simon Spero <[email protected]>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sesuncedu/commons-compress COMPRESS-405

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-compress/pull/28.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #28
    
----
commit 7f051c9cfe047289045618db3327fca018a25daf
Author: Simon Spero <[email protected]>
Date:   2017-06-11T16:21:16Z

    COMPRESS-405 Create Fixed Length Block OutputStream / WriteableByteChannel
    
    This commit provides a new class that is an OutputStream and 
WritableByteChannel, and which supports writing to a destination output stream 
or byte channel in fixed size blocks. Internally, all writes are made using NIO.
    If the destination is a  FileOutputStream the existing channel is used.
    Other OutputStreams are wrapped with a custom channel implementation which 
does not attempt to split writes into chunks.
    
    If the target channel fails to write the entire buffer in a single call, an 
exception is thrown,
    
    Incoming data is accumulated in a ByteBuffer until a complete block is 
ready, then written to the target.
    If  WritableByteChannel::write(ByteBuffer)  method is called, the code will 
attempt to avoid copying data into the buffer if the buffer is empty, and a 
complete block is available.
    
    The class and UnitTest are in compress/utils . This is a MINOR change - 
thus the version number for the package should be increated to 1.15.0.
    
    Signed-off-by: Simon Spero <[email protected]>

----


> Create Fixed Length Block OutputStream /Channel
> -----------------------------------------------
>
>                 Key: COMPRESS-405
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-405
>             Project: Commons Compress
>          Issue Type: Sub-task
>          Components: Archivers
>            Reporter: Simon Spero
>             Fix For: 1.15
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to