Package io.servicetalk.encoding.api
Interface ContentCodec
Deprecated.
API to support encode and decode of
Buffers.
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 aBufferand encode its contents resulting in aBufferwith the encoded contents. This call increases theBuffer.readerIndex()of thesrcwith the number of bytes available to readBuffer.readableBytes().- Parameters:
src- theBufferto encodeallocator- theBufferAllocatorto use for allocating auxiliary buffers or the returned buffer- Returns:
Bufferthe result buffer with the content encoded
-
decode
Deprecated.Take aBufferand decode its contents resulting in aBufferwith the decoded content. This call increases the {Buffer.readerIndex()of thesrcwith the number of bytes available to readBuffer.readableBytes().- Parameters:
src- theBufferto decodeallocator- theBufferAllocatorto use for allocating auxiliary buffers or the returned buffer- Returns:
Bufferthe result buffer with the content decoded
-
encode
Deprecated.Take aPublisherofBufferand encode its contents resulting in aPublisherofBufferwith the encoded contents.- Parameters:
from- thePublisherbuffer to encodeallocator- theBufferAllocatorto use for allocating auxiliary buffers or the returned buffer- Returns:
Publisherthe result publisher with the buffers encoded
-
decode
Deprecated.Take aPublisherofBufferand encode its contents resulting in aPublisherofBufferwith the decoded contents.- Parameters:
from- thePublisherto decodedallocator- theBufferAllocatorto use for allocating auxiliary buffers or the returned buffer- Returns:
Publisherthe result publisher with the buffers decoded
-
BufferEncoderandBufferDecoder.