public class ByteBuffer extends ByteString
EMPTY, hashCode| Constructor and Description |
|---|
ByteBuffer(Buffer buffer,
int byteCount) |
ByteBuffer(int pageSize,
int pageNo,
boolean isDirect) |
| Modifier and Type | Method and Description |
|---|---|
PageBuffer |
allocatePageBuffer()
申请内存页
|
ByteBuffer |
asByteBuffer() |
String |
base64() |
String |
base64Url() |
boolean |
equals(Object o) |
byte |
getByte(int pos) |
int |
hashCode() |
String |
hex() |
ByteString |
hmacSha1(ByteString key) |
ByteString |
hmacSha256(ByteString key) |
int |
indexOf(byte[] other,
int fromIndex) |
byte[] |
internalArray() |
int |
lastIndexOf(byte[] other,
int fromIndex) |
ByteString |
md5() |
Thread |
newThread(Runnable target,
String name)
申请FastBufferThread的线程对象,配合线程池申请会有更好的性能表现
|
boolean |
rangeEquals(int offset,
byte[] other,
int otherOffset,
int byteCount) |
boolean |
rangeEquals(int offset,
ByteString other,
int otherOffset,
int byteCount) |
void |
release()
释放回收内存
|
ByteString |
sha1() |
ByteString |
sha256() |
int |
size() |
String |
string(Charset charset) |
ByteString |
substring(int beginIndex) |
ByteString |
substring(int beginIndex,
int endIndex) |
ByteString |
toAsciiLowercase() |
ByteString |
toAsciiUppercase() |
byte[] |
toByteArray() |
String |
toString() |
String |
utf8() |
void |
write(Buffer buffer) |
void |
write(OutputStream out) |
compareTo, decodeBase64, decodeHex, encodeString, encodeUtf8, endsWith, endsWith, hmacSha512, indexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexOf, of, of, of, read, sha512, startsWith, startsWithpublic ByteBuffer(Buffer buffer, int byteCount)
public ByteBuffer(int pageSize,
int pageNo,
boolean isDirect)
pageSize - 内存页大小pageNo - 内存页个数isDirect - 是否使用直接缓冲区public String utf8()
utf8 in class ByteStringpublic String string(Charset charset)
string in class ByteStringpublic String base64()
base64 in class ByteStringpublic String hex()
hex in class ByteStringpublic ByteString toAsciiLowercase()
toAsciiLowercase in class ByteStringpublic ByteString toAsciiUppercase()
toAsciiUppercase in class ByteStringpublic ByteString md5()
md5 in class ByteStringpublic ByteString sha1()
sha1 in class ByteStringpublic ByteString sha256()
sha256 in class ByteStringpublic ByteString hmacSha1(ByteString key)
hmacSha1 in class ByteStringpublic ByteString hmacSha256(ByteString key)
hmacSha256 in class ByteStringpublic String base64Url()
base64Url in class ByteStringpublic ByteString substring(int beginIndex)
substring in class ByteStringpublic ByteString substring(int beginIndex, int endIndex)
substring in class ByteStringpublic byte getByte(int pos)
getByte in class ByteStringpublic int size()
size in class ByteStringpublic byte[] toByteArray()
toByteArray in class ByteStringpublic ByteBuffer asByteBuffer()
asByteBuffer in class ByteStringpublic void write(OutputStream out) throws IOException
write in class ByteStringIOExceptionpublic void write(Buffer buffer)
write in class ByteStringpublic boolean rangeEquals(int offset,
ByteString other,
int otherOffset,
int byteCount)
rangeEquals in class ByteStringpublic boolean rangeEquals(int offset,
byte[] other,
int otherOffset,
int byteCount)
rangeEquals in class ByteStringpublic int indexOf(byte[] other,
int fromIndex)
indexOf in class ByteStringpublic int lastIndexOf(byte[] other,
int fromIndex)
lastIndexOf in class ByteStringpublic byte[] internalArray()
internalArray in class ByteStringpublic boolean equals(Object o)
equals in class ByteStringpublic int hashCode()
hashCode in class ByteStringpublic Thread newThread(Runnable target, String name)
target - Runnablename - 线程名public PageBuffer allocatePageBuffer()
public void release()
Copyright © 2022. All rights reserved.