Class UTF8BufferType.UTF8BufferEncoding

  • All Implemented Interfaces:
    org.apache.qpid.proton.codec.PrimitiveTypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>, org.apache.qpid.proton.codec.TypeConstructor<org.fusesource.hawtbuf.UTF8Buffer>, org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
    Direct Known Subclasses:
    UTF8BufferType.LargeUTF8BufferEncoding, UTF8BufferType.SmallUTF8BufferEncoding
    Enclosing class:
    UTF8BufferType

    public abstract class UTF8BufferType.UTF8BufferEncoding
    extends Object
    implements org.apache.qpid.proton.codec.PrimitiveTypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
    • Constructor Detail

      • UTF8BufferEncoding

        public UTF8BufferEncoding​(org.apache.qpid.proton.codec.EncoderImpl encoder,
                                  org.apache.qpid.proton.codec.DecoderImpl decoder)
    • Method Detail

      • getConstructorSize

        public int getConstructorSize()
        Specified by:
        getConstructorSize in interface org.apache.qpid.proton.codec.PrimitiveTypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
        Specified by:
        getConstructorSize in interface org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
      • isFixedSizeVal

        public boolean isFixedSizeVal()
        Specified by:
        isFixedSizeVal in interface org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
      • encodesJavaPrimitive

        public boolean encodesJavaPrimitive()
        Specified by:
        encodesJavaPrimitive in interface org.apache.qpid.proton.codec.TypeConstructor<org.fusesource.hawtbuf.UTF8Buffer>
        Specified by:
        encodesJavaPrimitive in interface org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
      • getSizeBytes

        public abstract int getSizeBytes()
        Returns:
        the number of bytes the size portion of the encoded value requires.
      • writeConstructor

        public void writeConstructor()
        Specified by:
        writeConstructor in interface org.apache.qpid.proton.codec.PrimitiveTypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
        Specified by:
        writeConstructor in interface org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
      • writeValue

        public void writeValue​(org.fusesource.hawtbuf.UTF8Buffer value)
        Specified by:
        writeValue in interface org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
      • writeSize

        public abstract void writeSize​(org.fusesource.hawtbuf.UTF8Buffer value)
        Write the size of the buffer using the appropriate type (byte or int) depending on the encoding type being used.
        Parameters:
        value - The UTF8Buffer value that is being encoded.
      • getValueSize

        public int getValueSize​(org.fusesource.hawtbuf.UTF8Buffer value)
        Specified by:
        getValueSize in interface org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
      • getTypeClass

        public Class<org.fusesource.hawtbuf.UTF8Buffer> getTypeClass()
        Specified by:
        getTypeClass in interface org.apache.qpid.proton.codec.TypeConstructor<org.fusesource.hawtbuf.UTF8Buffer>
      • getType

        public org.apache.qpid.proton.codec.PrimitiveType<org.fusesource.hawtbuf.UTF8Buffer> getType()
        Specified by:
        getType in interface org.apache.qpid.proton.codec.PrimitiveTypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
        Specified by:
        getType in interface org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
      • encodesSuperset

        public boolean encodesSuperset​(org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer> encoding)
        Specified by:
        encodesSuperset in interface org.apache.qpid.proton.codec.TypeEncoding<org.fusesource.hawtbuf.UTF8Buffer>
      • readValue

        public org.fusesource.hawtbuf.UTF8Buffer readValue()
        Specified by:
        readValue in interface org.apache.qpid.proton.codec.TypeConstructor<org.fusesource.hawtbuf.UTF8Buffer>
      • skipValue

        public void skipValue()
        Specified by:
        skipValue in interface org.apache.qpid.proton.codec.TypeConstructor<org.fusesource.hawtbuf.UTF8Buffer>
      • getDecoder

        public org.apache.qpid.proton.codec.DecoderImpl getDecoder()
      • getEncoder

        public org.apache.qpid.proton.codec.EncoderImpl getEncoder()