Package eu.vstoyanov.natsy.codec
Object StringCodec
-
- All Implemented Interfaces:
-
eu.vstoyanov.natsy.codec.MessageCodec
public class StringCodec implements MessageCodec<String>
Carries a String as raw UTF-8 - no quoting, no escaping, exactly the bytes a
nats pubwould send. Always available;Stringneeds no registration.Decoding is strict.
String(bytes, UTF_8)silently replaces malformed input with U+FFFD, which would let a corrupt payload past DecodeErrorStrategy and into the collector looking like text; a reporting decoder fails instead, and the strategy decides what happens next.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringcontentTypepublic final static StringCodecINSTANCE
-