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

com.fireflysource.common.io.OutputChannel Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package com.fireflysource.common.io;

import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousChannel;
import java.util.concurrent.CompletableFuture;

public interface OutputChannel extends AsynchronousChannel, AsyncCloseable {

    /**
     * Write the content asynchronously.
     *
     * @param byteBuffer The buffer into which bytes are to be transferred.
     * @return The number of bytes write. If return -1, it presents the end of the content.
     */
    CompletableFuture write(ByteBuffer byteBuffer);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy