Class Data

    • Constructor Detail

      • Data

        protected Data​(byte[] array,
                       int offset,
                       int size)
      • Data

        public Data​(int initialCapacity)
      • Data

        public Data()
    • Method Detail

      • isConstant

        public boolean isConstant()
        Description copied from class: Item
        Returns true if this Item always evaluates to the same Item.
        Specified by:
        isConstant in class Item
      • size

        public final int size()
      • getByte

        public byte getByte​(int index)
      • setByte

        public Data setByte​(int index,
                            byte value)
      • addByte

        public Data addByte​(byte value)
      • addByteArray

        public Data addByteArray​(byte[] array,
                                 int offset,
                                 int size)
      • addByteArray

        public Data addByteArray​(byte[] array)
      • addData

        public Data addData​(Data data)
      • clear

        public void clear()
      • toByteArray

        public byte[] toByteArray()
      • asByteArray

        public byte[] asByteArray()
      • isAliased

        public boolean isAliased()
        Overrides:
        isAliased in class Value
      • isMutable

        public boolean isMutable()
        Overrides:
        isMutable in class Value
      • commit

        public Data commit()
        Description copied from class: Item
        Flags this Item as immutable, recursively if it is a Record, then returns this Item.
        Overrides:
        commit in class Value
      • writer

        public Writer<?,​?> writer()
      • writeBase16

        public Writer<?,​?> writeBase16​(Output<?> output)
      • toBase16

        public String toBase16()
      • writeBase64

        public Writer<?,​?> writeBase64​(Output<?> output)
      • toBase64

        public String toBase64()
      • typeOrder

        public int typeOrder()
        Description copied from class: Item
        Returns the heterogeneous sort order of this Item. Used to impose a total order on the set of all items. When comparing two items of different types, the items order according to their typeOrder.
        Specified by:
        typeOrder in class Item
      • equals

        public boolean equals​(Object other)
        Specified by:
        equals in class Item
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class Item
      • debug

        public <T> Output<T> debug​(Output<T> output)
        Description copied from interface: Debug
        Writes a developer readable, debug-formatted string representation of this object to output.
        Specified by:
        debug in interface Debug
        Specified by:
        debug in class Item
        Returns:
        the continuation of the output.
      • empty

        public static Data empty()
      • create

        public static Data create()
      • create

        public static Data create​(int initialCapacity)
      • wrap

        public static Data wrap​(byte[] array,
                                int offset,
                                int size)
      • wrap

        public static Data wrap​(byte[] array)
      • fromBase16

        public static Data fromBase16​(String string)
      • fromBase64

        public static Data fromBase64​(String string)
      • fromUtf8

        public static Data fromUtf8​(String string)
      • output

        public static Output<Data> output​(int initialCapacity)