public class AsyncSocketImpl.AsyncSocketOutputStream extends AsyncOutputStream
AsyncOutputStream of the AsyncSocketImpl.| Constructor and Description |
|---|
AsyncSocketOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
BufferMonitor |
createMonitor(long position,
MonitorListener listener)
Create an object that monitors for flush position of the output stream.
|
void |
flush() |
long |
getFlushPosition()
Get the position of stream that has been flushed.
|
long |
getPosition()
Get the position of the stream
|
long |
getUnflushedBytes()
Get number of bytes remaining to be written
|
void |
offer(ByteBuffer buf)
Offers byte buffer to the output stream for write.
|
void |
write(byte[] b,
int off,
int len) |
void |
write(ByteBuffer src)
Write to stream
|
void |
write(ByteBuffer src,
int length)
Write to stream
|
void |
write(int b) |
public void close()
public BufferMonitor createMonitor(long position, MonitorListener listener)
AsyncOutputStreamcreateMonitor in class AsyncOutputStreamposition - position to triggerlistener - alarm listenerpublic void flush()
throws IOException
IOExceptionpublic long getFlushPosition()
AsyncOutputStreamgetFlushPosition in class AsyncOutputStreampublic long getPosition()
AsyncOutputStreamgetPosition in class AsyncOutputStreampublic long getUnflushedBytes()
AsyncOutputStreamgetUnflushedBytes in class AsyncOutputStreampublic void offer(ByteBuffer buf)
AsyncOutputStreamoffer in class AsyncOutputStreambuf - buffer to offerpublic void write(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic void write(ByteBuffer src)
AsyncOutputStreamwrite in class AsyncOutputStreamsrc - a ByteBuffer object.public void write(ByteBuffer src, int length)
AsyncOutputStreamwrite in class AsyncOutputStreamsrc - a ByteBuffer object.length - a int.public void write(int b)
throws IOException
IOExceptionCopyright © 2026. All rights reserved.