public class SocketChannelOutputStream extends OutputStream
Modifier and Type | Field and Description |
---|---|
private SocketChannel |
channel |
private static long |
CHANNEL_FULL_WAIT_NANOS |
private ByteBuffer |
oneByteBuffer |
private int |
timeout |
Constructor and Description |
---|
SocketChannelOutputStream(SocketChannel socketChannel) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying SocketChannel
|
void |
setTimeout(int timeoutMillis) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
flush
private static final long CHANNEL_FULL_WAIT_NANOS
private final SocketChannel channel
private volatile int timeout
private final ByteBuffer oneByteBuffer
public SocketChannelOutputStream(SocketChannel socketChannel) throws IOException
IOException
public void setTimeout(int timeoutMillis)
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
- if issues closing underlying streamCopyright © 2019 Apache NiFi Project. All rights reserved.