Object BinaryCodec

  • All Implemented Interfaces:
    eu.vstoyanov.natsy.codec.MessageCodec

    
    public class BinaryCodec
     implements MessageCodec<ByteArray>
                        

    Carries a ByteArray unchanged. Always available; ByteArray needs no registration.

    Both directions hand back the array they were given rather than a copy, so a caller that mutates a published array before it reaches the wire changes what is sent.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      ByteArray encode(ByteArray value) Encode a value for publishing.
      ByteArray decode(ByteArray data) Decode bytes received from NATS.
      String getContentType() Content type identifier for this codec
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait