Package io.servicetalk.encoding.api
Interface ContentCodec
Deprecated.
API to support encode and decode of
Buffer
s.
Implementations must provide thread safety semantics, since instances could be shared across threads.
-
Method Summary
Modifier and TypeMethodDescriptiondecode
(Buffer src, BufferAllocator allocator) decode
(Publisher<Buffer> from, BufferAllocator allocator) Deprecated.encode
(Buffer src, BufferAllocator allocator) encode
(Publisher<Buffer> from, BufferAllocator allocator) Deprecated.name()
Deprecated.A unique textual representation for the coding.
-
Method Details
-
name
CharSequence name()Deprecated.A unique textual representation for the coding.- Returns:
- a unique textual representation for the coding.
-
encode
Deprecated.Take aBuffer
and encode its contents resulting in aBuffer
with the encoded contents. This call increases theBuffer.readerIndex()
of thesrc
with the number of bytes available to readBuffer.readableBytes()
.- Parameters:
src
- theBuffer
to encodeallocator
- theBufferAllocator
to use for allocating auxiliary buffers or the returned buffer- Returns:
Buffer
the result buffer with the content encoded
-
decode
Deprecated.Take aBuffer
and decode its contents resulting in aBuffer
with the decoded content. This call increases the {Buffer.readerIndex()
of thesrc
with the number of bytes available to readBuffer.readableBytes()
.- Parameters:
src
- theBuffer
to decodeallocator
- theBufferAllocator
to use for allocating auxiliary buffers or the returned buffer- Returns:
Buffer
the result buffer with the content decoded
-
encode
Deprecated.Take aPublisher
ofBuffer
and encode its contents resulting in aPublisher
ofBuffer
with the encoded contents.- Parameters:
from
- thePublisher
buffer to encodeallocator
- theBufferAllocator
to use for allocating auxiliary buffers or the returned buffer- Returns:
Publisher
the result publisher with the buffers encoded
-
decode
Deprecated.Take aPublisher
ofBuffer
and encode its contents resulting in aPublisher
ofBuffer
with the decoded contents.- Parameters:
from
- thePublisher
to decodedallocator
- theBufferAllocator
to use for allocating auxiliary buffers or the returned buffer- Returns:
Publisher
the result publisher with the buffers decoded
-
BufferEncoder
andBufferDecoder
.