commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMPRESS-405) Create Fixed Length Block OutputStream /Channel
Date Thu, 15 Jun 2017 17:13:00 GMT

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

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

Github user sesuncedu commented on a diff in the pull request:

    https://github.com/apache/commons-compress/pull/28#discussion_r122259069
  
    --- Diff: src/main/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStream.java
---
    @@ -0,0 +1,227 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.commons.compress.utils;
    +
    +import java.io.FileOutputStream;
    +import java.io.IOException;
    +import java.io.OutputStream;
    +import java.nio.ByteBuffer;
    +import java.nio.ByteOrder;
    +import java.nio.channels.ClosedChannelException;
    +import java.nio.channels.WritableByteChannel;
    +import java.util.concurrent.atomic.AtomicBoolean;
    +
    +public class FixedLengthBlockOutputStream extends OutputStream implements WritableByteChannel,
    +    AutoCloseable {
    --- End diff --
    
    Huh. Not only can I think of no good reason, I can't think of what I was thinking. 
     It might be because I've been writing a bunch of stuff that I wanted to use with try-with-resources
and which didn't have it (reactive stuff, and stuff that wrapped  closeables), so I added
AC automatically when I implemented close :-)


> 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.4.14#64029)

Mime
View raw message