Class DataImpl

java.lang.Object
org.apache.qpid.proton.codec.impl.DataImpl
All Implemented Interfaces:
Data

public class DataImpl extends Object implements Data
  • Constructor Details

    • DataImpl

      public DataImpl()
  • Method Details

    • free

      public void free()
      Specified by:
      free in interface Data
    • clear

      public void clear()
      Specified by:
      clear in interface Data
    • size

      public long size()
      Specified by:
      size in interface Data
    • rewind

      public void rewind()
      Specified by:
      rewind in interface Data
    • next

      public Data.DataType next()
      Specified by:
      next in interface Data
    • prev

      public Data.DataType prev()
      Specified by:
      prev in interface Data
    • enter

      public boolean enter()
      Specified by:
      enter in interface Data
    • exit

      public boolean exit()
      Specified by:
      exit in interface Data
    • type

      public Data.DataType type()
      Specified by:
      type in interface Data
    • encodedSize

      public long encodedSize()
      Specified by:
      encodedSize in interface Data
    • encode

      public Binary encode()
      Specified by:
      encode in interface Data
    • encode

      public long encode(ByteBuffer buf)
      Specified by:
      encode in interface Data
    • decode

      public long decode(ByteBuffer buf)
      Specified by:
      decode in interface Data
    • putList

      public void putList()
      Specified by:
      putList in interface Data
    • putMap

      public void putMap()
      Specified by:
      putMap in interface Data
    • putArray

      public void putArray(boolean described, Data.DataType type)
      Specified by:
      putArray in interface Data
    • putDescribed

      public void putDescribed()
      Specified by:
      putDescribed in interface Data
    • putNull

      public void putNull()
      Specified by:
      putNull in interface Data
    • putBoolean

      public void putBoolean(boolean b)
      Specified by:
      putBoolean in interface Data
    • putUnsignedByte

      public void putUnsignedByte(UnsignedByte ub)
      Specified by:
      putUnsignedByte in interface Data
    • putByte

      public void putByte(byte b)
      Specified by:
      putByte in interface Data
    • putUnsignedShort

      public void putUnsignedShort(UnsignedShort us)
      Specified by:
      putUnsignedShort in interface Data
    • putShort

      public void putShort(short s)
      Specified by:
      putShort in interface Data
    • putUnsignedInteger

      public void putUnsignedInteger(UnsignedInteger ui)
      Specified by:
      putUnsignedInteger in interface Data
    • putInt

      public void putInt(int i)
      Specified by:
      putInt in interface Data
    • putChar

      public void putChar(int c)
      Specified by:
      putChar in interface Data
    • putUnsignedLong

      public void putUnsignedLong(UnsignedLong ul)
      Specified by:
      putUnsignedLong in interface Data
    • putLong

      public void putLong(long l)
      Specified by:
      putLong in interface Data
    • putTimestamp

      public void putTimestamp(Date t)
      Specified by:
      putTimestamp in interface Data
    • putFloat

      public void putFloat(float f)
      Specified by:
      putFloat in interface Data
    • putDouble

      public void putDouble(double d)
      Specified by:
      putDouble in interface Data
    • putDecimal32

      public void putDecimal32(Decimal32 d)
      Specified by:
      putDecimal32 in interface Data
    • putDecimal64

      public void putDecimal64(Decimal64 d)
      Specified by:
      putDecimal64 in interface Data
    • putDecimal128

      public void putDecimal128(Decimal128 d)
      Specified by:
      putDecimal128 in interface Data
    • putUUID

      public void putUUID(UUID u)
      Specified by:
      putUUID in interface Data
    • putBinary

      public void putBinary(Binary bytes)
      Specified by:
      putBinary in interface Data
    • putBinary

      public void putBinary(byte[] bytes)
      Specified by:
      putBinary in interface Data
    • putString

      public void putString(String string)
      Specified by:
      putString in interface Data
    • putSymbol

      public void putSymbol(Symbol symbol)
      Specified by:
      putSymbol in interface Data
    • putObject

      public void putObject(Object o)
      Specified by:
      putObject in interface Data
    • putJavaMap

      public void putJavaMap(Map<Object,Object> map)
      Specified by:
      putJavaMap in interface Data
    • putJavaList

      public void putJavaList(List<Object> list)
      Specified by:
      putJavaList in interface Data
    • putDescribedType

      public void putDescribedType(DescribedType dt)
      Specified by:
      putDescribedType in interface Data
    • getList

      public long getList()
      Specified by:
      getList in interface Data
    • getMap

      public long getMap()
      Specified by:
      getMap in interface Data
    • getArray

      public long getArray()
      Specified by:
      getArray in interface Data
    • isArrayDescribed

      public boolean isArrayDescribed()
      Specified by:
      isArrayDescribed in interface Data
    • getArrayType

      public Data.DataType getArrayType()
      Specified by:
      getArrayType in interface Data
    • isDescribed

      public boolean isDescribed()
      Specified by:
      isDescribed in interface Data
    • isNull

      public boolean isNull()
      Specified by:
      isNull in interface Data
    • getBoolean

      public boolean getBoolean()
      Specified by:
      getBoolean in interface Data
    • getUnsignedByte

      public UnsignedByte getUnsignedByte()
      Specified by:
      getUnsignedByte in interface Data
    • getByte

      public byte getByte()
      Specified by:
      getByte in interface Data
    • getUnsignedShort

      public UnsignedShort getUnsignedShort()
      Specified by:
      getUnsignedShort in interface Data
    • getShort

      public short getShort()
      Specified by:
      getShort in interface Data
    • getUnsignedInteger

      public UnsignedInteger getUnsignedInteger()
      Specified by:
      getUnsignedInteger in interface Data
    • getInt

      public int getInt()
      Specified by:
      getInt in interface Data
    • getChar

      public int getChar()
      Specified by:
      getChar in interface Data
    • getUnsignedLong

      public UnsignedLong getUnsignedLong()
      Specified by:
      getUnsignedLong in interface Data
    • getLong

      public long getLong()
      Specified by:
      getLong in interface Data
    • getTimestamp

      public Date getTimestamp()
      Specified by:
      getTimestamp in interface Data
    • getFloat

      public float getFloat()
      Specified by:
      getFloat in interface Data
    • getDouble

      public double getDouble()
      Specified by:
      getDouble in interface Data
    • getDecimal32

      public Decimal32 getDecimal32()
      Specified by:
      getDecimal32 in interface Data
    • getDecimal64

      public Decimal64 getDecimal64()
      Specified by:
      getDecimal64 in interface Data
    • getDecimal128

      public Decimal128 getDecimal128()
      Specified by:
      getDecimal128 in interface Data
    • getUUID

      public UUID getUUID()
      Specified by:
      getUUID in interface Data
    • getBinary

      public Binary getBinary()
      Specified by:
      getBinary in interface Data
    • getString

      public String getString()
      Specified by:
      getString in interface Data
    • getSymbol

      public Symbol getSymbol()
      Specified by:
      getSymbol in interface Data
    • getObject

      public Object getObject()
      Specified by:
      getObject in interface Data
    • getJavaMap

      public Map<Object,Object> getJavaMap()
      Specified by:
      getJavaMap in interface Data
    • getJavaList

      public List<Object> getJavaList()
      Specified by:
      getJavaList in interface Data
    • getJavaArray

      public Object[] getJavaArray()
      Specified by:
      getJavaArray in interface Data
    • getDescribedType

      public DescribedType getDescribedType()
      Specified by:
      getDescribedType in interface Data
    • format

      public String format()
      Specified by:
      format in interface Data
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getZeroWidthElementLimit

      public int getZeroWidthElementLimit()
      Specified by:
      getZeroWidthElementLimit in interface Data
    • setZeroWidthElementLimit

      public void setZeroWidthElementLimit(int zeroWidthElementLimit)
      Specified by:
      setZeroWidthElementLimit in interface Data
    • getMaxDecodeDepth

      public int getMaxDecodeDepth()
      Returns the maximum decode depth allowed before error when decoding Maps, Lists, Arrays, and certain related DescribedTypes from an encoded payload.
      Returns:
      the maximum depth limit before error for Maps, Lists, Arrays and related DescribedTypes.
    • setMaxDecodeDepth

      public void setMaxDecodeDepth(int maxDecodeDepth)
      Configures the maximum decode depth allowed before error when decoding Maps, Lists, Arrays, and certain related DescribedTypes from an encoded payload. Default is 50. It would be unusual to set this to less than 3 due to nesting of types that make up the base protocol itself.