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) |
flushprivate 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
IOExceptionpublic void setTimeout(int timeoutMillis)
public void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOException - if issues closing underlying streamCopyright © 2019 Apache NiFi Project. All rights reserved.