Java java.nio.channels SocketChannel fields, constructors, methods, implement or subclass

Example usage for Java java.nio.channels SocketChannel fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.nio.channels SocketChannel.

The text is from its open source code.

Method

voidclose()
Closes this channel.
SelectableChannelconfigureBlocking(boolean block)
Adjusts this channel's blocking mode.
booleanconnect(SocketAddress remote)
Connects this channel's socket.
booleanequals(Object obj)
Indicates whether some other object is "equal to" this one.
booleanfinishConnect()
Finishes the process of connecting a socket channel.
SocketAddressgetLocalAddress()

If there is a security manager set, its checkConnect method is called with the local address and -1 as its arguments to see if the operation is allowed.

SocketAddressgetRemoteAddress()
Returns the remote address to which this channel's socket is connected.
booleanisBlocking()
booleanisConnected()
Tells whether or not this channel's network socket is connected.
booleanisConnectionPending()
Tells whether or not a connection operation is in progress on this channel.
booleanisOpen()
SocketChannelopen()
Opens a socket channel.
SocketChannelopen(SocketAddress remote)
Opens a socket channel and connects it to a remote address.
intread(ByteBuffer dst)
longread(ByteBuffer[] dsts)
SelectionKeyregister(Selector sel, int ops)
Registers this channel with the given selector, returning a selection key.
SelectionKeyregister(Selector sel, int ops, Object att)
Registers this channel with the given selector, returning a selection key.
SocketChannelsetOption(SocketOption name, T value)
Socketsocket()
Retrieves a socket associated with this channel.
intvalidOps()
Returns an operation set identifying this channel's supported operations.
intwrite(ByteBuffer src)
longwrite(ByteBuffer[] srcs)
longwrite(ByteBuffer[] srcs, int offset, int length)