- java.lang.Object
-
- swim.structure.Item
-
- swim.structure.Value
-
- swim.structure.Data
-
- All Implemented Interfaces:
Comparable<Item>,Iterable<Item>,swim.codec.Debug,swim.codec.Display
public class Data extends Value
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DataaddByte(byte value)DataaddByteArray(byte[] array)DataaddByteArray(byte[] array, int offset, int size)DataaddData(Data data)byte[]asByteArray()ByteBufferasByteBuffer()Databranch()voidclear()Datacommit()intcompareTo(Item other)static Datacreate()static Datacreate(int initialCapacity)voiddebug(swim.codec.Output<?> output)static Dataempty()booleanequals(Object other)static Datafrom(ByteBuffer buffer)static DatafromBase16(String string)static DatafromBase64(String string)static DatafromBase64(String string, swim.codec.Base64 base64)static DatafromUtf8(String string)bytegetByte(int index)inthashCode()booleanisAliased()booleanisConstant()booleanisMutable()static swim.codec.Output<Data>output()static swim.codec.Output<Data>output(int initialCapacity)static swim.codec.Output<Data>output(Data data)DatasetByte(int index, byte value)intsize()StringtoBase16()StringtoBase16(swim.codec.Base16 base16)StringtoBase64()StringtoBase64(swim.codec.Base64 base64)byte[]toByteArray()ByteBuffertoByteBuffer()swim.codec.InputBuffertoInputBuffer()inttypeOrder()Returns the heterogeneous sort order of thisItem.static Datawrap(byte[] array)static Datawrap(byte[] array, int offset, int size)static Datawrap(ByteBuffer buffer)swim.codec.Writer<?,?>write(swim.codec.Output<?> output)swim.codec.Writer<?,?>writeBase16(swim.codec.Output<?> output)swim.codec.Writer<?,?>writeBase16(swim.codec.Output<?> output, swim.codec.Base16 base16)swim.codec.Writer<?,?>writeBase64(swim.codec.Output<?> output)swim.codec.Writer<?,?>writeBase64(swim.codec.Output<?> output, swim.codec.Base64 base64)swim.codec.Writer<?,?>writer()-
Methods inherited from class swim.structure.Value
absent, alias, and, and, bitwiseAnd, bitwiseAnd, bitwiseNot, bitwiseOr, bitwiseOr, bitwiseXor, bitwiseXor, body, booleanValue, booleanValue, builder, byteValue, byteValue, charValue, charValue, conditional, conditional, contains, containsKey, containsKey, containsValue, divide, divide, doubleValue, doubleValue, eq, eq, extant, flattened, floatValue, floatValue, fromObject, ge, ge, get, get, getAttr, getAttr, getField, getField, getItem, getSlot, getSlot, gt, gt, head, header, headers, integerValue, integerValue, intValue, intValue, inverse, isDefined, isDistinct, key, keyEquals, lambda, le, le, length, longValue, longValue, lt, lt, minus, minus, modulo, modulo, ne, ne, negative, not, numberValue, numberValue, or, or, plus, plus, positive, removed, removed, shortValue, shortValue, stringValue, stringValue, tag, tail, target, times, times, toValue, unflattened
-
Methods inherited from class swim.structure.Item
appended, appended, appended, appended, appended, appended, appended, appended, cast, cast, coerce, coerce, concat, display, evaluate, evaluate, filter, filter, globalScope, invoke, iterator, max, min, precedence, prepended, prepended, prepended, prepended, prepended, prepended, prepended, prepended, substitute, substitute, toString, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
isConstant
public boolean isConstant()
Description copied from class:Item- Specified by:
isConstantin classItem
-
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)
-
clear
public void clear()
-
toByteArray
public byte[] toByteArray()
-
asByteArray
public byte[] asByteArray()
-
toByteBuffer
public ByteBuffer toByteBuffer()
-
asByteBuffer
public ByteBuffer asByteBuffer()
-
toInputBuffer
public swim.codec.InputBuffer toInputBuffer()
-
writer
public swim.codec.Writer<?,?> writer()
-
write
public swim.codec.Writer<?,?> write(swim.codec.Output<?> output)
-
writeBase16
public swim.codec.Writer<?,?> writeBase16(swim.codec.Output<?> output, swim.codec.Base16 base16)
-
writeBase16
public swim.codec.Writer<?,?> writeBase16(swim.codec.Output<?> output)
-
toBase16
public String toBase16(swim.codec.Base16 base16)
-
toBase16
public String toBase16()
-
writeBase64
public swim.codec.Writer<?,?> writeBase64(swim.codec.Output<?> output, swim.codec.Base64 base64)
-
writeBase64
public swim.codec.Writer<?,?> writeBase64(swim.codec.Output<?> output)
-
toBase64
public String toBase64(swim.codec.Base64 base64)
-
toBase64
public String toBase64()
-
typeOrder
public int typeOrder()
Description copied from class:ItemReturns the heterogeneous sort order of thisItem. Used to impose a total order on the set of all items. When comparing two items of different types, the items order according to theirtypeOrder.
-
compareTo
public int compareTo(Item other)
- Specified by:
compareToin interfaceComparable<Item>- Specified by:
compareToin classItem
-
debug
public void debug(swim.codec.Output<?> output)
-
output
public static swim.codec.Output<Data> output(int initialCapacity)
-
output
public static swim.codec.Output<Data> output()
-
empty
public static Data empty()
-
create
public static Data create()
-
create
public static Data create(int initialCapacity)
-
wrap
public static Data wrap(ByteBuffer buffer)
-
wrap
public static Data wrap(byte[] array, int offset, int size)
-
wrap
public static Data wrap(byte[] array)
-
from
public static Data from(ByteBuffer buffer)
-
-