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, setPayloadSize
public FileList(java.lang.String[] fileList) throws InternalError
fileList
- a list of files. Must not be empty.InternalError
protected FileList(byte[] packet) throws TransmissionError, SizeError, ProtocolError, InternalError
packet
- the full packet receivedSizeError
InternalError
ProtocolError
TransmissionError
protected byte[] toPacket() throws InternalError
toPacket
in class Payload
InternalError
public java.lang.String[] getFileList()