public class ReadSocket extends AbstractSocket
socket
Constructor and Description |
---|
ReadSocket(Socket socket,
int nbBytes)
Creates a read socket action.
|
Modifier and Type | Method and Description |
---|---|
int |
getNbBytes()
Gets the number of bytes to be read.
|
void |
onEnd(int nbBytesRead)
Called when the execution of the action is finished.
|
int |
onStart()
Called when the execution of the action is about to start.
|
getSocket
public ReadSocket(Socket socket, int nbBytes)
socket
- the socket of the read action.nbBytes
- the number of read bytes.public int getNbBytes()
public void onEnd(int nbBytesRead)
nbBytesRead
- the actual number of bytes read.public int onStart() throws SecurityException
SecurityException
- if the action is not allowed to be performed.