Package net.i2p.sam
Class SSLSocketChannel
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,GatheringByteChannel,InterruptibleChannel,NetworkChannel,ReadableByteChannel,ScatteringByteChannel,WritableByteChannel
class SSLSocketChannel extends SocketChannel
Simple wrapper for a SSLSocket. Cannot be used for asynch ops.- Since:
- 0.9.24
-
-
Constructor Summary
Constructors Constructor Description SSLSocketChannel(SSLSocket socket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketChannelbind(SocketAddress local)requires Java 7booleanconnect(SocketAddress remote)booleanfinishConnect()SocketAddressgetLocalAddress()<T> TgetOption(SocketOption<T> name)SocketAddressgetRemoteAddress()new in Java 7voidimplCloseSelectableChannel()voidimplConfigureBlocking(boolean block)booleanisConnected()booleanisConnectionPending()intread(ByteBuffer src)longread(ByteBuffer[] srcs, int offset, int length)<T> SocketChannelsetOption(SocketOption<T> name, T value)requires Java 7SocketChannelshutdownInput()new in Java 7SocketChannelshutdownOutput()new in Java 7Socketsocket()Set<SocketOption<?>>supportedOptions()intwrite(ByteBuffer src)longwrite(ByteBuffer[] srcs, int offset, int length)-
Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
-
Methods inherited from class java.nio.channels.SelectableChannel
register
-
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
-
-
-
Constructor Detail
-
SSLSocketChannel
public SSLSocketChannel(SSLSocket socket)
-
-
Method Detail
-
socket
public Socket socket()
- Specified by:
socketin classSocketChannel
-
connect
public boolean connect(SocketAddress remote)
- Specified by:
connectin classSocketChannel
-
finishConnect
public boolean finishConnect()
- Specified by:
finishConnectin classSocketChannel
-
isConnected
public boolean isConnected()
- Specified by:
isConnectedin classSocketChannel
-
isConnectionPending
public boolean isConnectionPending()
- Specified by:
isConnectionPendingin classSocketChannel
-
getRemoteAddress
public SocketAddress getRemoteAddress()
new in Java 7- Specified by:
getRemoteAddressin classSocketChannel
-
shutdownInput
public SocketChannel shutdownInput() throws IOException
new in Java 7- Specified by:
shutdownInputin classSocketChannel- Throws:
IOException
-
shutdownOutput
public SocketChannel shutdownOutput() throws IOException
new in Java 7- Specified by:
shutdownOutputin classSocketChannel- Throws:
IOException
-
setOption
public <T> SocketChannel setOption(SocketOption<T> name, T value)
requires Java 7- Specified by:
setOptionin interfaceNetworkChannel- Specified by:
setOptionin classSocketChannel
-
bind
public SocketChannel bind(SocketAddress local)
requires Java 7- Specified by:
bindin interfaceNetworkChannel- Specified by:
bindin classSocketChannel
-
read
public int read(ByteBuffer src) throws IOException
- Specified by:
readin interfaceReadableByteChannel- Specified by:
readin classSocketChannel- Throws:
IOException
-
read
public long read(ByteBuffer[] srcs, int offset, int length)
- Specified by:
readin interfaceScatteringByteChannel- Specified by:
readin classSocketChannel
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
writein interfaceWritableByteChannel- Specified by:
writein classSocketChannel- Throws:
IOException
-
write
public long write(ByteBuffer[] srcs, int offset, int length)
- Specified by:
writein interfaceGatheringByteChannel- Specified by:
writein classSocketChannel
-
implCloseSelectableChannel
public void implCloseSelectableChannel() throws IOException- Specified by:
implCloseSelectableChannelin classAbstractSelectableChannel- Throws:
IOException
-
implConfigureBlocking
public void implConfigureBlocking(boolean block) throws IOException- Specified by:
implConfigureBlockingin classAbstractSelectableChannel- Throws:
IOException
-
getLocalAddress
public SocketAddress getLocalAddress()
- Specified by:
getLocalAddressin interfaceNetworkChannel- Specified by:
getLocalAddressin classSocketChannel
-
getOption
public <T> T getOption(SocketOption<T> name)
-
supportedOptions
public Set<SocketOption<?>> supportedOptions()
-
-