org.pf.net
Class BinarySocketConnection
java.lang.Object
org.pf.util.ExceptionIgnorer
org.pf.net.SocketConnection
org.pf.net.BinarySocketConnection
public class BinarySocketConnection
- extends SocketConnection
Receives binary data from a socket and provides it to a request processor
by the getData() method
- Version:
- 1.1
- Author:
- Manfred Duchrow
|
Method Summary |
void |
close()
Close the connection and all release underlying resources. |
byte[] |
getData()
Tries to read data from the underlying input stream. |
boolean |
writeData(byte[] bytes)
Writes the given data to the underlying output stream |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinarySocketConnection
public BinarySocketConnection(java.net.Socket openSocket)
- Parameters:
openSocket - The socket this connection is based on
BinarySocketConnection
public BinarySocketConnection(java.net.Socket openSocket,
ExceptionHandler exHandler)
- Parameters:
openSocket - The socket this connection is based onexHandler - The exception handler for this connection
getData
public byte[] getData()
- Tries to read data from the underlying input stream. Blocks until some
data comes in and then returns it as a byte array.
writeData
public boolean writeData(byte[] bytes)
- Writes the given data to the underlying output stream
close
public void close()
- Close the connection and all release underlying resources.
- Overrides:
close in class SocketConnection