public class FileList extends Payload
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String[] |
fileList |
PAYLOAD_SIZE_POSITION, PAYLOAD_START_POSITION, requestResponseCode| Modifier | Constructor and Description |
|---|---|
protected |
FileList(byte[] packet)
Constructor (typically used by client) with a byte[] parameter containing the Packet received.
|
|
FileList(java.lang.String[] fileList)
Constructor (typically used by the server) with an ArrayList parameter containing
filenames.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getFileList()
fileList getter.
|
protected byte[] |
toPacket()
Returns a byte[] containing Packet with padding.
|
getPayloadSize, getRequestResponseCode, setPayloadSizepublic FileList(java.lang.String[] fileList)
throws InternalError
fileList - a list of files. Must not be empty.InternalErrorprotected FileList(byte[] packet)
throws TransmissionError,
SizeError,
ProtocolError,
InternalError
packet - the full packet receivedSizeErrorInternalErrorProtocolErrorTransmissionErrorprotected byte[] toPacket()
throws InternalError
toPacket in class PayloadInternalErrorpublic java.lang.String[] getFileList()