org.python.core.io
Class ServerSocketIO
- java.lang.Object
-
- org.python.core.io.IOBase
-
- org.python.core.io.RawIOBase
-
- org.python.core.io.SocketIOBase<java.nio.channels.ServerSocketChannel>
-
- org.python.core.io.ServerSocketIO
-
public class ServerSocketIO extends SocketIOBase<java.nio.channels.ServerSocketChannel>
Raw I/O implementation for server sockets.
-
-
Field Summary
-
Fields inherited from class org.python.core.io.IOBase
DEFAULT_BUFFER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description ServerSocketIO(java.nio.channels.ServerSocketChannel socketChannel, java.lang.String mode)Construct a ServerSocketIO for the given ServerSocketChannel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intreadinto(java.nio.ByteBuffer buf)Read up to buf.remaining() bytes into buf.intwrite(java.nio.ByteBuffer buf)Write the given ByteBuffer to the IO stream.-
Methods inherited from class org.python.core.io.SocketIOBase
close, getChannel, readable, writable
-
Methods inherited from class org.python.core.io.IOBase
asInputStream, asOutputStream, checkClosed, checkReadable, checkWritable, closed, flush, isatty, seek, seek, tell, truncate
-
-
-
-
Constructor Detail
-
ServerSocketIO
public ServerSocketIO(java.nio.channels.ServerSocketChannel socketChannel, java.lang.String mode)Construct a ServerSocketIO for the given ServerSocketChannel.- Parameters:
socketChannel- a ServerSocketChannel to wrapmode- a raw io socket mode String
-
-
Method Detail
-
readinto
public int readinto(java.nio.ByteBuffer buf)
Description copied from class:RawIOBaseRead up to buf.remaining() bytes into buf. Returns number of bytes read (0 for EOF).
-
write
public int write(java.nio.ByteBuffer buf)
Description copied from class:RawIOBaseWrite the given ByteBuffer to the IO stream. Returns the number of bytes written, which may be less than buf.remaining().
-
-
DMelt 3.0 © DataMelt by jWork.ORG