All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.schlichtherle.truezip.fs.archive.tar.FixedBufferedOutputStream Maven / Gradle / Ivy

Go to download

The file system driver family for TAR and related archive file types. Add the JAR artifact of this module to the run time class path to make its file system drivers available for service location in the client API modules.

The newest version!
/*
 * Copyright (C) 2005-2015 Schlichtherle IT Services.
 * All rights reserved. Use is subject to license terms.
 */
package de.schlichtherle.truezip.fs.archive.tar;

import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * Use this class to workaround issues with decorating objects which have
 * implementations which do not call close() again once it has failed.
 * 
 * @author Christian Schlichtherle
 */
final class FixedBufferedOutputStream extends BufferedOutputStream {
    boolean ignoreClose;

    FixedBufferedOutputStream(OutputStream out, int size) {
        super(out, size);
    }

    @Override
    public void close() throws IOException {
        if (!ignoreClose) super.close();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy