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 SocketChannel
bind(SocketAddress local)
requires Java 7boolean
connect(SocketAddress remote)
boolean
finishConnect()
SocketAddress
getLocalAddress()
<T> T
getOption(SocketOption<T> name)
SocketAddress
getRemoteAddress()
new in Java 7void
implCloseSelectableChannel()
void
implConfigureBlocking(boolean block)
boolean
isConnected()
boolean
isConnectionPending()
int
read(ByteBuffer src)
long
read(ByteBuffer[] srcs, int offset, int length)
<T> SocketChannel
setOption(SocketOption<T> name, T value)
requires Java 7SocketChannel
shutdownInput()
new in Java 7SocketChannel
shutdownOutput()
new in Java 7Socket
socket()
Set<SocketOption<?>>
supportedOptions()
int
write(ByteBuffer src)
long
write(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:
socket
in classSocketChannel
-
connect
public boolean connect(SocketAddress remote)
- Specified by:
connect
in classSocketChannel
-
finishConnect
public boolean finishConnect()
- Specified by:
finishConnect
in classSocketChannel
-
isConnected
public boolean isConnected()
- Specified by:
isConnected
in classSocketChannel
-
isConnectionPending
public boolean isConnectionPending()
- Specified by:
isConnectionPending
in classSocketChannel
-
getRemoteAddress
public SocketAddress getRemoteAddress()
new in Java 7- Specified by:
getRemoteAddress
in classSocketChannel
-
shutdownInput
public SocketChannel shutdownInput() throws IOException
new in Java 7- Specified by:
shutdownInput
in classSocketChannel
- Throws:
IOException
-
shutdownOutput
public SocketChannel shutdownOutput() throws IOException
new in Java 7- Specified by:
shutdownOutput
in classSocketChannel
- Throws:
IOException
-
setOption
public <T> SocketChannel setOption(SocketOption<T> name, T value)
requires Java 7- Specified by:
setOption
in interfaceNetworkChannel
- Specified by:
setOption
in classSocketChannel
-
bind
public SocketChannel bind(SocketAddress local)
requires Java 7- Specified by:
bind
in interfaceNetworkChannel
- Specified by:
bind
in classSocketChannel
-
read
public int read(ByteBuffer src) throws IOException
- Specified by:
read
in interfaceReadableByteChannel
- Specified by:
read
in classSocketChannel
- Throws:
IOException
-
read
public long read(ByteBuffer[] srcs, int offset, int length)
- Specified by:
read
in interfaceScatteringByteChannel
- Specified by:
read
in classSocketChannel
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
write
in interfaceWritableByteChannel
- Specified by:
write
in classSocketChannel
- Throws:
IOException
-
write
public long write(ByteBuffer[] srcs, int offset, int length)
- Specified by:
write
in interfaceGatheringByteChannel
- Specified by:
write
in classSocketChannel
-
implCloseSelectableChannel
public void implCloseSelectableChannel() throws IOException
- Specified by:
implCloseSelectableChannel
in classAbstractSelectableChannel
- Throws:
IOException
-
implConfigureBlocking
public void implConfigureBlocking(boolean block) throws IOException
- Specified by:
implConfigureBlocking
in classAbstractSelectableChannel
- Throws:
IOException
-
getLocalAddress
public SocketAddress getLocalAddress()
- Specified by:
getLocalAddress
in interfaceNetworkChannel
- Specified by:
getLocalAddress
in classSocketChannel
-
getOption
public <T> T getOption(SocketOption<T> name)
-
supportedOptions
public Set<SocketOption<?>> supportedOptions()
-
-