public class UdpInputOutput extends AbstractBinaryInputOutput implements SocketInputOutput
SocketInputOutput.Domain_env, _isEOF, _isTimeout, _lineReaderSEEK_CUR, SEEK_END, SEEK_SET| Constructor and Description |
|---|
UdpInputOutput(Env env,
java.net.DatagramSocket socket,
SocketInputOutput.Domain domain) |
UdpInputOutput(Env env,
java.lang.String host,
int port,
SocketInputOutput.Domain domain) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(java.net.SocketAddress address) |
void |
cleanup()
Implements the EnvCleanup interface.
|
void |
connect(java.net.SocketAddress address) |
long |
getPosition()
Returns the current location in the file.
|
void |
init() |
boolean |
isConnected() |
void |
setError(int error) |
boolean |
setPosition(long offset)
Sets the current location in the file.
|
void |
setTimeout(long timeout) |
java.lang.String |
toString()
Converts to a string.
|
void |
unread()
Unread the last byte.
|
appendTo, close, closeRead, closeWrite, flush, getAvailable, getEnv, getInputStream, getOutputStream, getResourceType, init, isEOF, isTimeout, openCopy, print, print, read, read, read, readLine, readOptionalLinefeed, seek, stat, toJavaObject, write, write, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendTo, close, closeRead, getAvailable, getInputStream, openCopy, read, read, read, readLine, readOptionalLinefeedclose, closeWrite, flush, getOutputStream, print, print, write, writeisEOF, seek, statpublic UdpInputOutput(Env env, java.lang.String host, int port, SocketInputOutput.Domain domain) throws java.io.IOException
java.io.IOExceptionpublic UdpInputOutput(Env env, java.net.DatagramSocket socket, SocketInputOutput.Domain domain)
public void bind(java.net.SocketAddress address)
throws java.io.IOException
bind in interface SocketInputOutputjava.io.IOExceptionpublic void connect(java.net.SocketAddress address)
throws java.io.IOException
connect in interface SocketInputOutputjava.io.IOExceptionpublic void init()
init in interface SocketInputOutputpublic void setTimeout(long timeout)
setTimeout in interface SocketInputOutputsetTimeout in class AbstractBinaryInputOutputpublic void setError(int error)
setError in interface SocketInputOutputpublic boolean isConnected()
isConnected in interface SocketInputOutputpublic long getPosition()
getPosition in interface BinaryInputgetPosition in interface BinaryStreamgetPosition in class AbstractBinaryInputOutputpublic boolean setPosition(long offset)
setPosition in interface BinaryInputsetPosition in interface BinaryStreamsetPosition in class AbstractBinaryInputOutputpublic void unread()
throws java.io.IOException
unread in interface BinaryInputunread in class AbstractBinaryInputOutputjava.io.IOExceptionpublic void cleanup()
cleanup in interface EnvCleanuppublic java.lang.String toString()
AbstractBinaryInputOutputtoString in class AbstractBinaryInputOutput