public abstract class Binary extends Object implements Comparable<Binary>, Serializable
| Modifier and Type | Field and Description |
|---|---|
static Binary |
EMPTY |
protected boolean |
isBackingBytesReused |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
compareTo(Binary other)
Deprecated.
will be removed in 2.0.0. The comparison logic depends on the related logical type therefore this one
might not be correct. The
Comparator implementation for the related type available at
PrimitiveType.comparator() should be used instead. |
Binary |
copy() |
boolean |
equals(Object obj) |
static Binary |
fromByteArray(byte[] value)
Deprecated.
|
static Binary |
fromByteArray(byte[] value,
int offset,
int length)
Deprecated.
|
static Binary |
fromByteBuffer(ByteBuffer value)
Deprecated.
|
static Binary |
fromCharSequence(CharSequence value) |
static Binary |
fromConstantByteArray(byte[] value) |
static Binary |
fromConstantByteArray(byte[] value,
int offset,
int length) |
static Binary |
fromConstantByteBuffer(ByteBuffer value) |
static Binary |
fromConstantByteBuffer(ByteBuffer value,
int offset,
int length) |
static Binary |
fromReusedByteArray(byte[] value) |
static Binary |
fromReusedByteArray(byte[] value,
int offset,
int length) |
static Binary |
fromReusedByteBuffer(ByteBuffer value) |
static Binary |
fromReusedByteBuffer(ByteBuffer value,
int offset,
int length) |
static Binary |
fromString(String value) |
short |
get2BytesLittleEndian() |
abstract byte[] |
getBytes() |
abstract byte[] |
getBytesUnsafe()
Variant of getBytes() that avoids copying backing data structure by returning
backing byte[] of the Binary.
|
boolean |
isBackingBytesReused()
Signals if backing bytes are owned, and can be modified, by producer of the Binary
|
abstract int |
length() |
static int |
lexicographicCompare(Binary one,
Binary other) |
abstract Binary |
slice(int start,
int length) |
abstract ByteBuffer |
toByteBuffer() |
String |
toString() |
abstract String |
toStringUsingUTF8() |
abstract void |
writeTo(DataOutput out) |
abstract void |
writeTo(OutputStream out) |
protected boolean isBackingBytesReused
public static final Binary EMPTY
public abstract String toStringUsingUTF8()
public abstract int length()
public abstract void writeTo(OutputStream out) throws IOException
IOExceptionpublic abstract void writeTo(DataOutput out) throws IOException
IOExceptionpublic abstract byte[] getBytes()
public abstract byte[] getBytesUnsafe()
public abstract Binary slice(int start, int length)
@Deprecated public abstract int compareTo(Binary other)
Comparator implementation for the related type available at
PrimitiveType.comparator() should be used instead.compareTo in interface Comparable<Binary>public abstract ByteBuffer toByteBuffer()
public short get2BytesLittleEndian()
public Binary copy()
public boolean isBackingBytesReused()
public static Binary fromReusedByteArray(byte[] value, int offset, int length)
public static Binary fromConstantByteArray(byte[] value, int offset, int length)
@Deprecated public static Binary fromByteArray(byte[] value, int offset, int length)
public static Binary fromReusedByteArray(byte[] value)
public static Binary fromConstantByteArray(byte[] value)
@Deprecated public static Binary fromByteArray(byte[] value)
public static Binary fromReusedByteBuffer(ByteBuffer value, int offset, int length)
public static Binary fromConstantByteBuffer(ByteBuffer value, int offset, int length)
public static Binary fromReusedByteBuffer(ByteBuffer value)
public static Binary fromConstantByteBuffer(ByteBuffer value)
@Deprecated public static Binary fromByteBuffer(ByteBuffer value)
public static Binary fromCharSequence(CharSequence value)
Copyright © 2024 The Apache Software Foundation. All rights reserved.