Class PreEncodedHeader

java.lang.Object
dev.relism.flash.models.PreEncodedHeader

public final class PreEncodedHeader extends Object
A header name/value pair pre-encoded once (typically at boot, as a static final constant) and reused across many responses via Response.header(PreEncodedHeader).

Unlike Response.header(byte[]), which accepts an opaque HTTP/1 field line, this class preserves the name/value boundary. HTTP/1 can render it as a line and HTTP/2 can encode it with HPACK, so one constant works on both protocols.

  • Constructor Details

    • PreEncodedHeader

      public PreEncodedHeader(String name, String value)
  • Method Details