Nouvelles Regex : FFE_GET_FILE_RESULT_OK validée

This commit is contained in:
Maximilien LEDOUX 2022-03-19 13:33:03 +01:00
parent 0f84ed8355
commit 67d85200a7

View File

@ -2,6 +2,7 @@ package lightcontainer.protocol.rules.writer;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.utils.FileSender; import lightcontainer.utils.FileSender;
import java.io.IOException; import java.io.IOException;
@ -9,9 +10,12 @@ import java.io.OutputStream;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import static lightcontainer.protocol.StandardizedDefinitions.FFE_GET_FILE_RESULT_OK;
public class GetFileOkRule extends ProtocolWriter { public class GetFileOkRule extends ProtocolWriter {
// Constants // Constants
private static final String PATTERN = "^GETFILE_OK ([^ !]{1,20}) ([0-9]{1,10})\r\n$"; //"^GETFILE_OK ([^ !]{1,20}) ([0-9]{1,10})\r\n$"
private static final String PATTERN = FFE_GET_FILE_RESULT_OK;
public static final String NAME = "GETFILE_OK"; public static final String NAME = "GETFILE_OK";
// -- params // -- params
private static final int FILE_NAME = 0; // Index file name hashed private static final int FILE_NAME = 0; // Index file name hashed