Package com.germancoding.packetapi.udp
Class UnreliableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.germancoding.packetapi.udp.UnreliableInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class UnreliableInputStream extends java.io.InputStream
-
-
Constructor Summary
Constructors Constructor Description UnreliableInputStream(UnreliableSocket socket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
java.net.InetAddress
getLastContactAddress()
int
getLastContactPort()
int
read()
void
setLastContactAddress(java.net.InetAddress address, int port)
void
setLastContactPort(int lastContactPort)
-
-
-
Constructor Detail
-
UnreliableInputStream
public UnreliableInputStream(UnreliableSocket socket) throws java.net.SocketException
- Throws:
java.net.SocketException
-
-
Method Detail
-
available
public int available() throws java.io.IOException
- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
getLastContactAddress
public java.net.InetAddress getLastContactAddress()
-
setLastContactAddress
public void setLastContactAddress(java.net.InetAddress address, int port)
-
getLastContactPort
public int getLastContactPort()
-
setLastContactPort
public void setLastContactPort(int lastContactPort)
-
-