public class DiscoverRequest extends Payload
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
filename |
PAYLOAD_SIZE_POSITION, PAYLOAD_START_POSITION, requestResponseCode| Modifier | Constructor and Description |
|---|---|
protected |
DiscoverRequest(byte[] packet)
Constructor (typically used by server) with a byte[] parameter containing the Packet received.
|
|
DiscoverRequest(java.lang.String filename)
Constructor with filename (typically used by client).
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFilename()
Filename getter.
|
protected byte[] |
toPacket()
Returns a byte[] containing Packet with padding.
|
getPayloadSize, getRequestResponseCode, setPayloadSizepublic DiscoverRequest(java.lang.String filename)
throws InternalError
filename - Name of the file you want a server list of.InternalErrorprotected DiscoverRequest(byte[] packet)
throws SizeError,
ProtocolError,
InternalError,
TransmissionError
packet - the full Packet receivedSizeErrorInternalErrorProtocolErrorTransmissionErrorprotected byte[] toPacket()
throws InternalError
toPacket in class PayloadInternalErrorpublic java.lang.String getFilename()