Package org.apache.parquet.io.api
Class Binary
java.lang.Object
org.apache.parquet.io.api.Binary
- All Implemented Interfaces:
Serializable,Comparable<Binary>
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionabstract intDeprecated.will be removed in 2.0.0.copy()booleanstatic BinaryfromByteArray(byte[] value) Deprecated.static BinaryfromByteArray(byte[] value, int offset, int length) Deprecated.static BinaryfromByteBuffer(ByteBuffer value) Deprecated.static BinaryfromCharSequence(CharSequence value) static BinaryfromConstantByteArray(byte[] value) static BinaryfromConstantByteArray(byte[] value, int offset, int length) static BinaryfromConstantByteBuffer(ByteBuffer value) static BinaryfromConstantByteBuffer(ByteBuffer value, int offset, int length) static BinaryfromReusedByteArray(byte[] value) static BinaryfromReusedByteArray(byte[] value, int offset, int length) static BinaryfromReusedByteBuffer(ByteBuffer value) static BinaryfromReusedByteBuffer(ByteBuffer value, int offset, int length) static BinaryfromString(String value) shortabstract byte[]getBytes()abstract byte[]Variant of getBytes() that avoids copying backing data structure by returning backing byte[] of the Binary.booleanSignals if backing bytes are owned, and can be modified, by producer of the Binaryabstract intlength()static intlexicographicCompare(Binary one, Binary other) abstract Binaryslice(int start, int length) abstract ByteBuffertoString()abstract Stringabstract voidwriteTo(DataOutput out) abstract voidwriteTo(OutputStream out)
-
Field Details
-
isBackingBytesReused
protected boolean isBackingBytesReused -
EMPTY
-
-
Method Details
-
toStringUsingUTF8
-
length
public abstract int length() -
writeTo
- Throws:
IOException
-
writeTo
- Throws:
IOException
-
getBytes
public abstract byte[] getBytes() -
getBytesUnsafe
public abstract byte[] getBytesUnsafe()Variant of getBytes() that avoids copying backing data structure by returning backing byte[] of the Binary. Do not modify backing byte[] unless you know what you are doing.- Returns:
- backing byte[] of correct size, with an offset of 0, if possible, else returns result of getBytes()
-
slice
-
compareTo
Deprecated.will be removed in 2.0.0. The comparison logic depends on the related logical type therefore this one might not be correct. TheComparatorimplementation for the related type available atPrimitiveType.comparator()should be used instead.- Specified by:
compareToin interfaceComparable<Binary>
-
toByteBuffer
-
get2BytesLittleEndian
public short get2BytesLittleEndian() -
equals
-
toString
-
copy
-
isBackingBytesReused
public boolean isBackingBytesReused()Signals if backing bytes are owned, and can be modified, by producer of the Binary- Returns:
- if backing bytes are held on by producer of the Binary
-
fromReusedByteArray
-
fromConstantByteArray
-
fromByteArray
Deprecated. -
fromReusedByteArray
-
fromConstantByteArray
-
fromByteArray
Deprecated. -
fromReusedByteBuffer
-
fromConstantByteBuffer
-
fromReusedByteBuffer
-
fromConstantByteBuffer
-
fromByteBuffer
Deprecated. -
fromString
-
fromCharSequence
-
lexicographicCompare
-