public class MimeTypeMetadataCodec extends Object
For more on the format of the metadata, see the Stream Data MIME Types extension specification.
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
decode(ByteBuf byteBuf)
Decode the per-stream MIME type metadata encoded in the given
ByteBuf. |
static ByteBuf |
encode(ByteBufAllocator allocator,
List<String> mimeTypes)
Encode multiple MIME types into a newly allocated
ByteBuf. |
static ByteBuf |
encode(ByteBufAllocator allocator,
String mimeType)
Encode the given MIME type into a newly allocated
ByteBuf. |
static ByteBuf |
encode(ByteBufAllocator allocator,
WellKnownMimeType mimeType)
Encode a
WellKnownMimeType into a newly allocated single byte ByteBuf. |
public static ByteBuf encode(ByteBufAllocator allocator, WellKnownMimeType mimeType)
WellKnownMimeType into a newly allocated single byte ByteBuf.allocator - the allocator to create the buffer withmimeType - well-known MIME type to encodepublic static ByteBuf encode(ByteBufAllocator allocator, String mimeType)
ByteBuf.allocator - the allocator to create the buffer withmimeType - MIME type to encodepublic static ByteBuf encode(ByteBufAllocator allocator, List<String> mimeTypes)
ByteBuf.allocator - the allocator to create the buffer withmimeTypes - MIME types to encode