public interface ContentCodec
Buffers.
Implementations must provide thread safety semantics, since instances could be shared across threads.
| Modifier and Type | Method and Description |
|---|---|
default Buffer |
decode(Buffer src,
BufferAllocator allocator)
Take a
Buffer and decode its contents resulting in a Buffer with the decoded content. |
Buffer |
decode(Buffer src,
int offset,
int length,
BufferAllocator allocator)
Take a
Buffer and decode its contents resulting in a Buffer with the decoded content. |
Publisher<Buffer> |
decode(Publisher<Buffer> from,
BufferAllocator allocator)
Take a
Publisher of Buffer and encode its contents resulting in a
Publisher of Buffer with the decoded contents. |
default Buffer |
encode(Buffer src,
BufferAllocator allocator)
Take a
Buffer and encode its contents resulting in a Buffer with the encoded contents. |
Buffer |
encode(Buffer src,
int offset,
int length,
BufferAllocator allocator)
Take a
Buffer and encode its contents resulting in a Buffer with the encoded contents. |
Publisher<Buffer> |
encode(Publisher<Buffer> from,
BufferAllocator allocator)
Take a
Publisher of Buffer and encode its contents resulting in a
Publisher of Buffer with the encoded contents. |
CharSequence |
name()
A unique textual representation for the coding.
|
CharSequence name()
default Buffer encode(Buffer src,
BufferAllocator allocator)
Buffer and encode its contents resulting in a Buffer with the encoded contents.
This call increases the Buffer.readerIndex() of the src with the number
of bytes available to read Buffer.readableBytes().src - the Buffer to encodeallocator - the BufferAllocator to use for allocating auxiliary buffers or the returned bufferBuffer the result buffer with the content encodedBuffer encode(Buffer src,
int offset,
int length,
BufferAllocator allocator)
Buffer and encode its contents resulting in a Buffer with the encoded contents.
This call increases the Buffer.readerIndex() of the src with the number
of bytes read length.src - the Buffer to encodeoffset - the offset after the current Buffer.readerIndex() to start reading fromlength - the total count of bytes to readallocator - the BufferAllocator to use for allocating auxiliary buffers or the returned bufferBuffer the result buffer with the content encodeddefault Buffer decode(Buffer src,
BufferAllocator allocator)
Buffer and decode its contents resulting in a Buffer with the decoded content.
This call increases the {Buffer.readerIndex() of the src with the number of
bytes available to read Buffer.readableBytes().src - the Buffer to decodeallocator - the BufferAllocator to use for allocating auxiliary buffers or the returned bufferBuffer the result buffer with the content decodedBuffer decode(Buffer src,
int offset,
int length,
BufferAllocator allocator)
Buffer and decode its contents resulting in a Buffer with the decoded content.
This call increases the Buffer.readerIndex() of the src with the number
of bytes read length.src - the Buffer to decodeoffset - the offset after the current Buffer.readerIndex() to start reading fromlength - the total count of bytes to readallocator - the BufferAllocator to use for allocating auxiliary buffers or the returned bufferBuffer the result buffer with the content decodedPublisher<Buffer> encode(Publisher<Buffer> from,
BufferAllocator allocator)
Publisher of Buffer and encode its contents resulting in a
Publisher of Buffer with the encoded contents.from - the Publisher buffer to encodeallocator - the BufferAllocator to use for allocating auxiliary buffers or the returned bufferPublisher the result publisher with the buffers encodedPublisher<Buffer> decode(Publisher<Buffer> from,
BufferAllocator allocator)
Publisher of Buffer and encode its contents resulting in a
Publisher of Buffer with the decoded contents.from - the Publisher to decodedallocator - the BufferAllocator to use for allocating auxiliary buffers or the returned bufferPublisher the result publisher with the buffers decoded