Class IdentityStreamEncoder
java.lang.Object
de.craftsblock.craftsnet.api.http.encoding.StreamEncoder
de.craftsblock.craftsnet.api.http.encoding.builtin.IdentityStreamEncoder
A concrete implementation of
StreamEncoder that performs no encoding
and returns the input and output streams as they are.
This is commonly referred to as the "identity" encoding, which means no transformation
is applied to the stream data.- Since:
- 3.3.3-SNAPSHOT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull InputStreamencodeInputStream(@NotNull InputStream raw) Returns the raw input stream without applying any encoding.@NotNull OutputStreamencodeOutputStream(@NotNull OutputStream raw) Returns the raw output stream without applying any encoding.Methods inherited from class de.craftsblock.craftsnet.api.http.encoding.StreamEncoder
equals, getEncodingName, hashCode, isAvailable
-
Constructor Details
-
IdentityStreamEncoder
public IdentityStreamEncoder()Constructs a newIdentityStreamEncoder. The encoding name is set to "identity", indicating no encoding is applied.
-
-
Method Details
-
encodeOutputStream
Returns the raw output stream without applying any encoding. This implementation simply delegates to the superclass method without modification.- Overrides:
encodeOutputStreamin classStreamEncoder- Parameters:
raw- The raw output stream to encode.- Returns:
- The raw output stream.
-
encodeInputStream
Returns the raw input stream without applying any encoding. This implementation simply delegates to the superclass method without modification.- Overrides:
encodeInputStreamin classStreamEncoder- Parameters:
raw- The raw input stream to encode.- Returns:
- The raw input stream.
-