From: David ‘Bombe’ Roden Date: Mon, 27 May 2024 19:59:55 +0000 (+0200) Subject: ✨ Add additional getters for PersistentPut fields X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=760020fb31d25adc1a84aced66447f79102f7808;p=jFCPlib.git ✨ Add additional getters for PersistentPut fields --- 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"); + } + }