net.sf.asyncobjects.net.nio
Class NIOSocketInputStream
java.lang.Object
net.sf.asyncobjects.AsyncUnicastServer<T>
net.sf.asyncobjects.net.nio.NIOStream<AByteInput>
net.sf.asyncobjects.net.nio.NIOSocketInputStream
- All Implemented Interfaces:
- ACloseable, AsyncObject, ExplicitSharing, AByteInput, AInput<BinaryData>
public class NIOSocketInputStream
- extends NIOStream<AByteInput>
- implements AByteInput
implementation of stream for sockets
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
read
public Promise<BinaryData> read(int limit)
- Read some bytes.
- Specified by:
read
in interface AInput<BinaryData>
- Parameters:
limit
- a maximum amount of bytes to read
- Returns:
- Promise for data, null means EOF.
- See Also:
AInput.read(int)
shutdownStream
protected void shutdownStream()
throws IOException
- Description copied from class:
NIOStream
- Shutdown stream
- Specified by:
shutdownStream
in class NIOStream<AByteInput>
- Throws:
IOException
- if there is a problem with shutdowing- See Also:
NIOStream.shutdownStream()
isPushbackSupported
public Promise<Boolean> isPushbackSupported()
- Specified by:
isPushbackSupported
in interface AInput<BinaryData>
- Returns:
- true if pushback supported for this stream
- See Also:
AInput.isPushbackSupported()
pushback
public Promise<Void> pushback(BinaryData data)
- Push back data
- Specified by:
pushback
in interface AInput<BinaryData>
- Parameters:
data
- a data to push back
- Returns:
- when pushback finished
- See Also:
AInput.pushback(net.sf.asyncobjects.io.BatchedData)
Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.