|
barchart-udt-core 2.3.0-SNAPSHOT / 2013-05-13T01:37:38.485-0500 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.net.Socket
com.barchart.udt.net.NetSocketUDT
com.barchart.udt.nio.NioSocketUDT
public class NioSocketUDT
| Field Summary | |
|---|---|
protected SocketChannelUDT |
channelUDT
|
| Fields inherited from class com.barchart.udt.net.NetSocketUDT |
|---|
inputStream, outputStream, socketUDT |
| Constructor Summary | |
|---|---|
protected |
NioSocketUDT(SocketChannelUDT channelUDT)
|
| Method Summary | |
|---|---|
SocketChannelUDT |
getChannel()
Returns the unique SocketChannel
object associated with this socket, if any. |
InputStream |
getInputStream()
Returns an input stream for this socket. |
OutputStream |
getOutputStream()
Returns an output stream for this socket. |
| Methods inherited from class java.net.Socket |
|---|
setSocketImplFactory, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.barchart.udt.net.IceSocket |
|---|
toString |
| Field Detail |
|---|
protected final SocketChannelUDT channelUDT
| Constructor Detail |
|---|
protected NioSocketUDT(SocketChannelUDT channelUDT)
throws ExceptionUDT
ExceptionUDT| Method Detail |
|---|
public SocketChannelUDT getChannel()
IceSocketSocketChannel
object associated with this socket, if any.
A socket will have a channel if, and only if, the channel itself was
created via the SocketChannel.open or
ServerSocketChannel.accept methods.
getChannel in interface IceSocketgetChannel in class NetSocketUDT
public InputStream getInputStream()
throws IOException
IceSocket
If this socket has an associated channel then the resulting input stream
delegates all of its operations to the channel. If the channel is in
non-blocking mode then the input stream's read operations will
throw an IllegalBlockingModeException.
Under abnormal conditions the underlying connection may be broken by the remote host or the network software (for example a connection reset in the case of TCP connections). When a broken connection is detected by the network software the following applies to the returned input stream :-
The network software may discard bytes that are buffered by the socket.
Bytes that aren't discarded by the network software can be read using
read.
If there are no bytes buffered on the socket, or all buffered bytes have
been consumed by read, then all
subsequent calls to read will throw an
IOException.
If there are no bytes buffered on the socket, and the socket has not been
closed using close, then
available will return
0.
Closing the returned InputStream will close
the associated socket.
getInputStream in interface IceSocketgetInputStream in class NetSocketUDTIOException - if an I/O error occurs when creating the input stream, the
socket is closed, the socket is not connected, or the
socket input has been shutdown using
IceSocket.shutdownInput()
revised 1.4 spec JSR-51
public OutputStream getOutputStream()
throws IOException
IceSocket
If this socket has an associated channel then the resulting output stream
delegates all of its operations to the channel. If the channel is in
non-blocking mode then the output stream's write operations will
throw an IllegalBlockingModeException.
Closing the returned OutputStream will close
the associated socket.
getOutputStream in interface IceSocketgetOutputStream in class NetSocketUDTIOException - if an I/O error occurs when creating the output stream or
if the socket is not connected. revised 1.4 spec JSR-51
|
barchart-udt-core 2.3.0-SNAPSHOT / 2013-05-13T01:37:38.485-0500 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||