Class IdentityStreamEncoder

java.lang.Object
de.craftsblock.craftsnet.api.http.encoding.StreamEncoder
de.craftsblock.craftsnet.api.http.encoding.builtin.IdentityStreamEncoder

public final class IdentityStreamEncoder extends StreamEncoder
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 Details

    • IdentityStreamEncoder

      public IdentityStreamEncoder()
      Constructs a new IdentityStreamEncoder. The encoding name is set to "identity", indicating no encoding is applied.
  • Method Details

    • encodeOutputStream

      @NotNull public @NotNull OutputStream encodeOutputStream(@NotNull @NotNull OutputStream raw)
      Returns the raw output stream without applying any encoding. This implementation simply delegates to the superclass method without modification.
      Overrides:
      encodeOutputStream in class StreamEncoder
      Parameters:
      raw - The raw output stream to encode.
      Returns:
      The raw output stream.
    • encodeInputStream

      @NotNull public @NotNull InputStream encodeInputStream(@NotNull @NotNull InputStream raw)
      Returns the raw input stream without applying any encoding. This implementation simply delegates to the superclass method without modification.
      Overrides:
      encodeInputStream in class StreamEncoder
      Parameters:
      raw - The raw input stream to encode.
      Returns:
      The raw input stream.