public abstract class OutputStreamChannel extends OutputStream implements WritableByteChannel, Closeable
| Modifier and Type | Field and Description |
|---|---|
protected WritableByteChannel |
channel |
protected static long |
PARK_NANOS
nanos to park reader thread to wait for writing data in non-blocking mode
(will be explicitly signalled by selector if data can be written)
|
protected static long |
PARK_NANOS_MAX |
protected Thread |
parkedThread |
| Modifier | Constructor and Description |
|---|---|
protected |
OutputStreamChannel(WritableByteChannel channel) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
flushBufferNonBlocking(ByteBuffer buffer,
boolean isChannelBuffer) |
Thread |
getParkedThread() |
WritableByteChannel |
getUnderlyingChannel()
Get the underlying
WritableByteChannel. |
abstract int |
write(ByteBuffer src) |
protected int |
writeBuffer(ByteBuffer buffer) |
protected int |
writeBuffered(ByteBuffer src,
ByteBuffer channelBuffer)
Common base method to write a given ByteBuffer source via an intermediate
direct byte buffer owned by the implementation of this class.
|
protected int |
writeBufferNonBlocking(ByteBuffer buffer) |
protected final WritableByteChannel channel
protected volatile Thread parkedThread
protected static final long PARK_NANOS
protected static final long PARK_NANOS_MAX
protected OutputStreamChannel(WritableByteChannel channel)
public final WritableByteChannel getUnderlyingChannel()
WritableByteChannel.public abstract int write(ByteBuffer src) throws IOException
write in interface WritableByteChannelIOExceptionprotected final int writeBuffered(ByteBuffer src, ByteBuffer channelBuffer) throws IOException
IOExceptionprotected boolean flushBufferNonBlocking(ByteBuffer buffer, boolean isChannelBuffer) throws IOException
IOExceptionprotected int writeBuffer(ByteBuffer buffer) throws IOException
IOExceptionprotected int writeBufferNonBlocking(ByteBuffer buffer) throws IOException
IOExceptionpublic final Thread getParkedThread()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.