java.lang.Object
org.miaixz.bus.http.metric.http.Http2Header
An HTTP header: the name is an ASCII string, but the value can be UTF-8.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe size of this header in HPACK's format.final org.miaixz.bus.core.io.ByteStringName in case-insensitive ASCII encoding.static final org.miaixz.bus.core.io.ByteStringThe ":" prefix used for pseudo-headers.static final org.miaixz.bus.core.io.ByteStringThe ":status" pseudo-header.static final org.miaixz.bus.core.io.ByteStringThe ":authority" pseudo-header.static final org.miaixz.bus.core.io.ByteStringThe ":method" pseudo-header.static final org.miaixz.bus.core.io.ByteStringThe ":path" pseudo-header.static final org.miaixz.bus.core.io.ByteStringThe ":scheme" pseudo-header.final org.miaixz.bus.core.io.ByteStringValue in UTF-8 encoding. -
Constructor Summary
ConstructorsConstructorDescriptionHttp2Header(String name, String value) Constructs a new Http2Header with the given name and value.Http2Header(org.miaixz.bus.core.io.ByteString name, String value) Constructs a new Http2Header with the given name and value.Http2Header(org.miaixz.bus.core.io.ByteString name, org.miaixz.bus.core.io.ByteString value) Constructs a new Http2Header with the given name and value. -
Method Summary
-
Field Details
-
PSEUDO_PREFIX
public static final org.miaixz.bus.core.io.ByteString PSEUDO_PREFIXThe ":" prefix used for pseudo-headers. -
RESPONSE_STATUS
public static final org.miaixz.bus.core.io.ByteString RESPONSE_STATUSThe ":status" pseudo-header. -
TARGET_METHOD
public static final org.miaixz.bus.core.io.ByteString TARGET_METHODThe ":method" pseudo-header. -
TARGET_PATH
public static final org.miaixz.bus.core.io.ByteString TARGET_PATHThe ":path" pseudo-header. -
TARGET_SCHEME
public static final org.miaixz.bus.core.io.ByteString TARGET_SCHEMEThe ":scheme" pseudo-header. -
TARGET_AUTHORITY
public static final org.miaixz.bus.core.io.ByteString TARGET_AUTHORITYThe ":authority" pseudo-header. -
name
public final org.miaixz.bus.core.io.ByteString nameName in case-insensitive ASCII encoding. -
value
public final org.miaixz.bus.core.io.ByteString valueValue in UTF-8 encoding. -
hpackSize
public final int hpackSizeThe size of this header in HPACK's format.
-
-
Constructor Details
-
Http2Header
Constructs a new Http2Header with the given name and value.- Parameters:
name- The header name.value- The header value.
-
Http2Header
Constructs a new Http2Header with the given name and value.- Parameters:
name- The header name as a ByteString.value- The header value as a String.
-
Http2Header
public Http2Header(org.miaixz.bus.core.io.ByteString name, org.miaixz.bus.core.io.ByteString value) Constructs a new Http2Header with the given name and value.- Parameters:
name- The header name as a ByteString.value- The header value as a ByteString.
-
-
Method Details
-
equals
Compares this Http2Header to another object for equality. -
hashCode
public int hashCode()Returns the hash code for this Http2Header. -
toString
Returns a string representation of this Http2Header.
-