public class UdpInputOutput extends AbstractBinaryInputOutput implements SocketInputOutput
SocketInputOutput.Domain
_env, _isEOF, _isTimeout, _lineReader
SEEK_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, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendTo, close, closeRead, getAvailable, getInputStream, openCopy, read, read, read, readLine, readOptionalLinefeed
close, closeWrite, flush, getOutputStream, print, print, write, write
isEOF, seek, stat
public UdpInputOutput(Env env, java.lang.String host, int port, SocketInputOutput.Domain domain) throws java.io.IOException
java.io.IOException
public UdpInputOutput(Env env, java.net.DatagramSocket socket, SocketInputOutput.Domain domain)
public void bind(java.net.SocketAddress address) throws java.io.IOException
bind
in interface SocketInputOutput
java.io.IOException
public void connect(java.net.SocketAddress address) throws java.io.IOException
connect
in interface SocketInputOutput
java.io.IOException
public void init()
init
in interface SocketInputOutput
public void setTimeout(long timeout)
setTimeout
in interface SocketInputOutput
setTimeout
in class AbstractBinaryInputOutput
public void setError(int error)
setError
in interface SocketInputOutput
public boolean isConnected()
isConnected
in interface SocketInputOutput
public long getPosition()
getPosition
in interface BinaryInput
getPosition
in interface BinaryStream
getPosition
in class AbstractBinaryInputOutput
public boolean setPosition(long offset)
setPosition
in interface BinaryInput
setPosition
in interface BinaryStream
setPosition
in class AbstractBinaryInputOutput
public void unread() throws java.io.IOException
unread
in interface BinaryInput
unread
in class AbstractBinaryInputOutput
java.io.IOException
public void cleanup()
cleanup
in interface EnvCleanup
public java.lang.String toString()
AbstractBinaryInputOutput
toString
in class AbstractBinaryInputOutput