@InterfaceAudience.Private
public final class HBaseZeroCopyByteString
extends com.google.protobuf.ByteString
ByteString without copy.
Without this protobufs would force us to copy every single byte array out of the objects de-serialized from the wire (which already do one copy, on top of the copies the JVM does to go from kernel buffer to C buffer and from C buffer to JVM buffer).
| 限定符和类型 | 字段和说明 |
|---|---|
protected byte[] |
bytes |
| 限定符和类型 | 方法和说明 |
|---|---|
ByteBuffer |
asReadOnlyByteBuffer() |
List<ByteBuffer> |
asReadOnlyByteBufferList() |
byte |
byteAt(int arg0) |
void |
copyTo(ByteBuffer arg0) |
protected void |
copyToInternal(byte[] arg0,
int arg1,
int arg2,
int arg3) |
boolean |
equals(Object arg0) |
protected int |
getOffsetIntoBytes() |
protected int |
getTreeDepth() |
int |
hashCode() |
protected boolean |
isBalanced() |
boolean |
isValidUtf8() |
com.google.protobuf.ByteString.ByteIterator |
iterator() |
com.google.protobuf.CodedInputStream |
newCodedInput() |
InputStream |
newInput() |
protected int |
partialHash(int arg0,
int arg1,
int arg2) |
protected int |
partialIsValidUtf8(int arg0,
int arg1,
int arg2) |
protected int |
peekCachedHashCode() |
int |
size() |
com.google.protobuf.ByteString |
substring(int arg0,
int arg1) |
String |
toString(String arg0) |
static com.google.protobuf.ByteString |
wrap(byte[] array)
Wraps a byte array in a
ByteString without copying it. |
static com.google.protobuf.ByteString |
wrap(byte[] array,
int offset,
int length)
Wraps a subset of a byte array in a
ByteString without copying it. |
void |
writeTo(OutputStream arg0) |
static byte[] |
zeroCopyGetBytes(com.google.protobuf.ByteString buf)
Extracts the byte array from the given
ByteString without copy. |
concat, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFromUtf8, copyTo, copyTo, isEmpty, newOutput, newOutput, readFrom, readFrom, readFrom, startsWith, substring, toByteArray, toString, toStringUtf8forEach, spliteratorpublic static com.google.protobuf.ByteString wrap(byte[] array)
ByteString without copying it.array - array to be wrappedpublic static com.google.protobuf.ByteString wrap(byte[] array,
int offset,
int length)
ByteString without copying it.array - array to be wrappedoffset - fromlength - lengthpublic static byte[] zeroCopyGetBytes(com.google.protobuf.ByteString buf)
ByteString without copy.buf - A buffer from which to extract the array. This buffer must be
actually an instance of a LiteralByteString.public byte byteAt(int arg0)
byteAt 在类中 com.google.protobuf.ByteStringpublic int size()
size 在类中 com.google.protobuf.ByteStringpublic com.google.protobuf.ByteString substring(int arg0,
int arg1)
substring 在类中 com.google.protobuf.ByteStringprotected void copyToInternal(byte[] arg0,
int arg1,
int arg2,
int arg3)
copyToInternal 在类中 com.google.protobuf.ByteStringpublic void copyTo(ByteBuffer arg0)
copyTo 在类中 com.google.protobuf.ByteStringpublic ByteBuffer asReadOnlyByteBuffer()
asReadOnlyByteBuffer 在类中 com.google.protobuf.ByteStringpublic List<ByteBuffer> asReadOnlyByteBufferList()
asReadOnlyByteBufferList 在类中 com.google.protobuf.ByteStringpublic void writeTo(OutputStream arg0) throws IOException
writeTo 在类中 com.google.protobuf.ByteStringIOExceptionpublic String toString(String arg0) throws UnsupportedEncodingException
toString 在类中 com.google.protobuf.ByteStringUnsupportedEncodingExceptionpublic boolean isValidUtf8()
isValidUtf8 在类中 com.google.protobuf.ByteStringprotected int partialIsValidUtf8(int arg0,
int arg1,
int arg2)
partialIsValidUtf8 在类中 com.google.protobuf.ByteStringpublic boolean equals(Object arg0)
equals 在类中 com.google.protobuf.ByteStringpublic int hashCode()
hashCode 在类中 com.google.protobuf.ByteStringprotected int peekCachedHashCode()
peekCachedHashCode 在类中 com.google.protobuf.ByteStringprotected int partialHash(int arg0,
int arg1,
int arg2)
partialHash 在类中 com.google.protobuf.ByteStringpublic InputStream newInput()
newInput 在类中 com.google.protobuf.ByteStringpublic com.google.protobuf.CodedInputStream newCodedInput()
newCodedInput 在类中 com.google.protobuf.ByteStringpublic com.google.protobuf.ByteString.ByteIterator iterator()
protected int getTreeDepth()
getTreeDepth 在类中 com.google.protobuf.ByteStringprotected boolean isBalanced()
isBalanced 在类中 com.google.protobuf.ByteStringprotected int getOffsetIntoBytes()
Copyright © 2007–2019. All rights reserved.