/*
 * Copyright (c) 2004-2017, by Alex Leigh.
 * All rights reserved.
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE
 * The copyright notice above does not evidence any
 * actual or intended publication of such source code.
 */

package lc.mecha.io;

import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class NonClosingOutputStream extends FilterOutputStream {
    public NonClosingOutputStream(final OutputStream out) {
        super(out);
    }

    @Override
    public void write(final byte[] b) throws IOException {
        this.out.write(b);
    }

    @Override
    public void write(final byte[] b, final int off, final int len) throws IOException {
        this.out.write(b, off, len);
    }

    @Override
    /**
     * Ignores the close() but performs a flush() instead.
     */
    public void close() throws IOException {
        // Intentionally Blank
    }

}
