From d12985ac3165a021774dc6c5350cb91a5b7d5e2f Mon Sep 17 00:00:00 2001 From: Gerhard Muth Date: Sun, 29 Dec 2024 19:49:52 +0100 Subject: [PATCH] renamed uncompressing to decompressing --- src/main/kotlin/de/gmuth/ipp/attributes/Compression.kt | 2 +- src/main/kotlin/de/gmuth/ipp/core/IppMessage.kt | 2 +- src/main/kotlin/de/gmuth/ipp/core/IppRequest.kt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/de/gmuth/ipp/attributes/Compression.kt b/src/main/kotlin/de/gmuth/ipp/attributes/Compression.kt index af79d977..3ff3af94 100644 --- a/src/main/kotlin/de/gmuth/ipp/attributes/Compression.kt +++ b/src/main/kotlin/de/gmuth/ipp/attributes/Compression.kt @@ -37,7 +37,7 @@ enum class Compression(val keyword: String) : IppAttributeBuilder { else -> throw NotImplementedError("compression '$this'") } - fun getUncompressingInputStream(inputStream: InputStream) = when (this) { + fun getDecompressingInputStream(inputStream: InputStream) = when (this) { NONE -> inputStream GZIP -> GZIPInputStream(inputStream) DEFLATE -> DeflaterInputStream(inputStream) diff --git a/src/main/kotlin/de/gmuth/ipp/core/IppMessage.kt b/src/main/kotlin/de/gmuth/ipp/core/IppMessage.kt index 0f26a12f..a06151e4 100644 --- a/src/main/kotlin/de/gmuth/ipp/core/IppMessage.kt +++ b/src/main/kotlin/de/gmuth/ipp/core/IppMessage.kt @@ -138,7 +138,7 @@ abstract class IppMessage() { } else { documentInputStream = if (operationGroup.containsKey("compression")) { - compression.getUncompressingInputStream(bufferedInputStream) + compression.getDecompressingInputStream(bufferedInputStream) } else { bufferedInputStream } diff --git a/src/main/kotlin/de/gmuth/ipp/core/IppRequest.kt b/src/main/kotlin/de/gmuth/ipp/core/IppRequest.kt index 88775e41..94c4b464 100644 --- a/src/main/kotlin/de/gmuth/ipp/core/IppRequest.kt +++ b/src/main/kotlin/de/gmuth/ipp/core/IppRequest.kt @@ -39,6 +39,7 @@ class IppRequest : IppMessage { val requestedAttributes: List get() = operationGroup.getValues("requested-attributes") + @JvmOverloads constructor(userAgent: String? = null) : super() { httpUserAgent = userAgent }