assertgetPayloadSize(datagram)+8<=datagram.length:"Payload is truncated";
if(datagram.length<getPayloadSize(datagram)+8){
assertgetPayloadSize(packet)+8<=packet.length:"Payload is truncated";
if(packet.length<getPayloadSize(packet)+8){
thrownewTransmissionError();
}
assertRequestResponseCode.fromCode(datagram[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.LIST_RESPONSE||(thisinstanceofFileList):"LIST_RESPONSE must use FilePart class";
assertRequestResponseCode.fromCode(datagram[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.LOAD_RESPONSE||(thisinstanceofFilePart):"LOAD_RESPONSE must use FileList class";
assertRequestResponseCode.fromCode(datagram[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.LOAD_REQUEST||(thisinstanceofLoadRequest):"LOAD_REQUEST must use LoadRequest class";
assertRequestResponseCode.fromCode(packet[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.LIST_RESPONSE||(thisinstanceofFileList):"LIST_RESPONSE must use FilePart class";
assertRequestResponseCode.fromCode(packet[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.LOAD_RESPONSE||(thisinstanceofFilePart):"LOAD_RESPONSE must use FileList class";
assertRequestResponseCode.fromCode(packet[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.LOAD_REQUEST||(thisinstanceofLoadRequest):"LOAD_REQUEST must use LoadRequest class";