diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java index 9ee5feb..9128f97 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java @@ -13,15 +13,13 @@ import lightcontainer.utils.ShaHasher; import java.io.IOException; import java.io.InputStream; -import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_SAVE_FILE; - /** * Règle permettant de sauvegarder un fichier sur le SBE. * Celui-ci va chiffre le contenu du fichier à l'aide de AES. */ public class SavefileRule extends ProtocolReader { // Constants - private static final String PATTERN = CLIENT_SAVE_FILE; + private static final String PATTERN = "^SAVE_FILE ([^ !]{1,20}) ([0-9]{1,10})\r\n$"; private static final String NAME = "SAVEFILE"; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java index 8503887..2895da1 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java @@ -6,14 +6,12 @@ import lightcontainer.utils.FileSender; import java.io.OutputStream; -import static lightcontainer.protocol.StandardizedDefinitions.FFE_SENDFILE; - /** * Règle envoyée au SBE, demandant la sauvegarde d'un fichier. */ public class SendfileRule extends ProtocolWriter { //"^SENDFILE [A-Za-z0-9]{50,200} [0-9]{1,10} [A-Za-z0-9]{50,200}\r\n$" - private static final String PATTERN = FFE_SENDFILE; + private static final String PATTERN = "^SENDFILE [A-Za-z0-9]{50,200} [0-9]{1,10} [A-Za-z0-9]{50,200}\\r\\n$"; public static final String NAME = "SENDFILE";