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

net.java.truecommons.io.OneTimeSink Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (C) 2005-2015 Schlichtherle IT Services.
 * All rights reserved. Use is subject to license terms.
 */
package net.java.truecommons.io;

import java.io.OutputStream;
import java.nio.channels.SeekableByteChannel;
import javax.annotation.concurrent.NotThreadSafe;

/**
 * A sink which can get used only once to obtain a given output stream or
 * seekable byte channel.
 *
 * @see    OneTimeSource
 * @author Christian Schlichtherle
 */
@NotThreadSafe
public final class OneTimeSink
extends OneTimeFoundry
implements Sink {

    public OneTimeSink(OutputStream out) {
        super(out);
    }

    public OneTimeSink(SeekableByteChannel channel) {
        super(channel);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy