Package org.apache.qpid.proton.codec

# Class EncoderImpl

java.lang.Object
org.apache.qpid.proton.codec.EncoderImpl

All Implemented Interfaces:
  `ByteBufferEncoder`, `Encoder`

public final class EncoderImpl extends Object implements ByteBufferEncoder

## Constructor Summary

Constructors
Constructor
Description
`EncoderImpl(DecoderImpl decoder)`

## Method Summary

Modifier and Type
Method
Description
`WritableBuffer`
`getBuffer()`
`DecoderImpl`
`getDecoder()`
`AMQPType`
`getType(Object element)`
`AMQPType`
`getTypeFromClass(Class clazz)`
`<V> void`
`register(AMQPType<V> type)`
`void`
`registerDescribedType(Class clazz, Object descriptor)`
`void`
`setByteBuffer(ByteBuffer buf)`
`void`
`setByteBuffer(WritableBuffer buf)`
`void`
`writeArray(boolean[] a)`
`void`
`writeArray(byte[] a)`
`void`
`writeArray(char[] a)`
`void`
`writeArray(double[] a)`
`void`
`writeArray(float[] a)`
`void`
`writeArray(int[] a)`
`void`
`writeArray(long[] a)`
`void`
`writeArray(short[] a)`
`void`
`writeArray(Object[] a)`
`void`
`writeBinary(Binary b)`
`void`
`writeBoolean(boolean bool)`
`void`
`writeBoolean(Boolean bool)`
`void`
`writeByte(byte b)`
`void`
`writeByte(Byte b)`
`void`
`writeCharacter(char c)`
`void`
`writeCharacter(Character c)`
`void`
`writeDecimal128(Decimal128 d)`
`void`
`writeDecimal32(Decimal32 d)`
`void`
`writeDecimal64(Decimal64 d)`
`void`
`writeDescribedType(DescribedType d)`
`void`
`writeDouble(double d)`
`void`
`writeDouble(Double d)`
`void`
`writeFloat(float f)`
`void`
`writeFloat(Float f)`
`void`
`writeInteger(int i)`
`void`
`writeInteger(Integer i)`
`void`
`writeList(List l)`
`void`
`writeLong(long l)`
`void`
`writeLong(Long l)`
`void`
`writeMap(Map m)`
`void`
`writeNull()`
`void`
`writeObject(Object o)`
`void`
`writeRaw(byte b)`
`void`
`writeShort(short s)`
`void`
`writeShort(Short s)`
`void`
`writeString(String s)`
`void`
`writeSymbol(Symbol s)`
`void`
`writeTimestamp(long timestamp)`
`void`
`writeTimestamp(Date d)`
`void`
`writeUnsignedByte(UnsignedByte ubyte)`
`void`
`writeUnsignedInteger(UnsignedInteger uint)`
`void`
`writeUnsignedLong(UnsignedLong ulong)`
`void`
`writeUnsignedShort(UnsignedShort ushort)`
`void`
`writeUUID(UUID uuid)`

### Methods inherited from class java.lang.Object

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

## Constructor Details

### EncoderImpl

public EncoderImpl(DecoderImpl decoder)

## Method Details

### setByteBuffer

public void setByteBuffer(ByteBuffer buf)

Specified by:
  `setByteBuffer` in interface `ByteBufferEncoder`

### setByteBuffer

public void setByteBuffer(WritableBuffer buf)

### getBuffer

public WritableBuffer getBuffer()

### getDecoder

public DecoderImpl getDecoder()

### getType

public AMQPType getType(Object element)

Specified by:
  `getType` in interface `Encoder`

### getTypeFromClass

public AMQPType getTypeFromClass(Class clazz)

### register

public <V> void register(AMQPType<V> type)

Specified by:
  `register` in interface `Encoder`

### registerDescribedType

public void registerDescribedType(Class clazz, Object descriptor)

### writeNull

public void writeNull()

Specified by:
  `writeNull` in interface `Encoder`

### writeBoolean

public void writeBoolean(boolean bool)

Specified by:
  `writeBoolean` in interface `Encoder`

### writeBoolean

public void writeBoolean(Boolean bool)

Specified by:
  `writeBoolean` in interface `Encoder`

### writeUnsignedByte

public void writeUnsignedByte(UnsignedByte ubyte)

Specified by:
  `writeUnsignedByte` in interface `Encoder`

### writeUnsignedShort

public void writeUnsignedShort(UnsignedShort ushort)

Specified by:
  `writeUnsignedShort` in interface `Encoder`

### writeUnsignedInteger

public void writeUnsignedInteger(UnsignedInteger uint)

Specified by:
  `writeUnsignedInteger` in interface `Encoder`

### writeUnsignedLong

public void writeUnsignedLong(UnsignedLong ulong)

Specified by:
  `writeUnsignedLong` in interface `Encoder`

### writeByte

public void writeByte(byte b)

Specified by:
  `writeByte` in interface `Encoder`

### writeByte

public void writeByte(Byte b)

Specified by:
  `writeByte` in interface `Encoder`

### writeShort

public void writeShort(short s)

Specified by:
  `writeShort` in interface `Encoder`

### writeShort

public void writeShort(Short s)

Specified by:
  `writeShort` in interface `Encoder`

### writeInteger

public void writeInteger(int i)

Specified by:
  `writeInteger` in interface `Encoder`

### writeInteger

public void writeInteger(Integer i)

Specified by:
  `writeInteger` in interface `Encoder`

### writeLong

public void writeLong(long l)

Specified by:
  `writeLong` in interface `Encoder`

### writeLong

public void writeLong(Long l)

Specified by:
  `writeLong` in interface `Encoder`

### writeFloat

public void writeFloat(float f)

Specified by:
  `writeFloat` in interface `Encoder`

### writeFloat

public void writeFloat(Float f)

Specified by:
  `writeFloat` in interface `Encoder`

### writeDouble

public void writeDouble(double d)

Specified by:
  `writeDouble` in interface `Encoder`

### writeDouble

public void writeDouble(Double d)

Specified by:
  `writeDouble` in interface `Encoder`

### writeDecimal32

public void writeDecimal32(Decimal32 d)

Specified by:
  `writeDecimal32` in interface `Encoder`

### writeDecimal64

public void writeDecimal64(Decimal64 d)

Specified by:
  `writeDecimal64` in interface `Encoder`

### writeDecimal128

public void writeDecimal128(Decimal128 d)

Specified by:
  `writeDecimal128` in interface `Encoder`

### writeCharacter

public void writeCharacter(char c)

Specified by:
  `writeCharacter` in interface `Encoder`

### writeCharacter

public void writeCharacter(Character c)

Specified by:
  `writeCharacter` in interface `Encoder`

### writeTimestamp

public void writeTimestamp(long timestamp)

Specified by:
  `writeTimestamp` in interface `Encoder`

### writeTimestamp

public void writeTimestamp(Date d)

Specified by:
  `writeTimestamp` in interface `Encoder`

### writeUUID

public void writeUUID(UUID uuid)

Specified by:
  `writeUUID` in interface `Encoder`

### writeBinary

public void writeBinary(Binary b)

Specified by:
  `writeBinary` in interface `Encoder`

### writeString

public void writeString(String s)

Specified by:
  `writeString` in interface `Encoder`

### writeSymbol

public void writeSymbol(Symbol s)

Specified by:
  `writeSymbol` in interface `Encoder`

### writeList

public void writeList(List l)

Specified by:
  `writeList` in interface `Encoder`

### writeMap

public void writeMap(Map m)

Specified by:
  `writeMap` in interface `Encoder`

### writeDescribedType

public void writeDescribedType(DescribedType d)

Specified by:
  `writeDescribedType` in interface `Encoder`

### writeArray

public void writeArray(boolean[] a)

Specified by:
  `writeArray` in interface `Encoder`

### writeArray

public void writeArray(byte[] a)

Specified by:
  `writeArray` in interface `Encoder`

### writeArray

public void writeArray(short[] a)

Specified by:
  `writeArray` in interface `Encoder`

### writeArray

public void writeArray(int[] a)

Specified by:
  `writeArray` in interface `Encoder`

### writeArray

public void writeArray(long[] a)

Specified by:
  `writeArray` in interface `Encoder`

### writeArray

public void writeArray(float[] a)

Specified by:
  `writeArray` in interface `Encoder`

### writeArray

public void writeArray(double[] a)

Specified by:
  `writeArray` in interface `Encoder`

### writeArray

public void writeArray(char[] a)

Specified by:
  `writeArray` in interface `Encoder`

### writeArray

public void writeArray(Object[] a)

Specified by:
  `writeArray` in interface `Encoder`

### writeObject

public void writeObject(Object o)

Specified by:
  `writeObject` in interface `Encoder`

### writeRaw

public void writeRaw(byte b)