From 760020fb31d25adc1a84aced66447f79102f7808 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 27 May 2024 21:59:55 +0200 Subject: [PATCH] =?utf8?q?=E2=9C=A8=20Add=20additional=20getters=20for=20P?= =?utf8?q?ersistentPut=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../java/net/pterodactylus/fcp/PersistentPut.java | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/main/java/net/pterodactylus/fcp/PersistentPut.java b/src/main/java/net/pterodactylus/fcp/PersistentPut.java index 6a40361..ac2d6db 100644 --- a/src/main/java/net/pterodactylus/fcp/PersistentPut.java +++ b/src/main/java/net/pterodactylus/fcp/PersistentPut.java @@ -125,6 +125,15 @@ public class PersistentPut extends BaseMessage implements Identifiable { } /** + * Returns the filename of the original request, if specified. + * + * @return The filename of the original request, or {@code null} if none was given + */ + public String getFilename() { + return getField("Filename"); + } + + /** * Returns the target filename of the request. * * @return The target filename of the request @@ -152,6 +161,24 @@ public class PersistentPut extends BaseMessage implements Identifiable { } /** + * Returns the private URI of the original request, if specified. + * + * @return The private URI of the original request, or {@code null} if none was given + */ + public String getPrivateURI() { + return getField("PrivateURI"); + } + + /** + * Returns the target URI of the original request, if specified. + * + * @return The target URI of the original request, or {@code null} if none was given + */ + public String getTargetURI() { + return getField("TargetURI"); + } + + /** * Returns the verbosity of the request. * * @return The verbosity of the request @@ -160,4 +187,43 @@ public class PersistentPut extends BaseMessage implements Identifiable { return Verbosity.valueOf(getField("Verbosity")); } + public boolean isBinaryBlob() { + return Boolean.parseBoolean(getField("BinaryBlob")); + } + + /** + * Returns the compatibility mode of the original request. + * + * @return The compatibility mode of the original request, or {@code null} if none was given + */ + public String getCompatibilityMode() { + return getField("CompatibilityMode"); + } + + public boolean isDontCompress() { + return Boolean.parseBoolean(getField("DontCompress")); + } + + /** + * Returns the compression codecs of the original request. + * + * @return The compression codecs of the original request, or {@code null} if none were given + */ + public String getCodecs() { + return getField("Codecs"); + } + + public boolean isRealTime() { + return Boolean.parseBoolean(getField("RealTime")); + } + + /** + * Returns the splitfile crypto key of the original request. + * + * @return The splitfile crypto key of the original request, or {@code null} if none was given + */ + public String getSplitfileCryptoKey() { + return getField("SplitfileCryptoKey"); + } + } -- 2.7.4