Modifier and Type | Field and Description |
---|---|
static ByteString |
ByteString.EMPTY
A singleton empty
ByteString . |
Modifier and Type | Method and Description |
---|---|
static ByteString |
ByteString.decodeBase64(String base64)
Decodes the Base64-encoded bytes and returns their value as a byte string.
|
static ByteString |
ByteString.decodeHex(String hex)
Decodes the hex-encoded bytes and returns their value a byte string.
|
static ByteString |
ByteString.encodeUtf8(String s)
Returns a new byte string containing the
UTF-8 bytes of s . |
ByteString |
ByteString.md5()
Returns the MD5 hash of this byte string.
|
static ByteString |
ByteString.of(byte... data)
Returns a new byte string containing a clone of the bytes of
data . |
static ByteString |
ByteString.of(byte[] data,
int offset,
int byteCount)
Returns a new byte string containing a copy of
byteCount bytes of data starting
at offset . |
static ByteString |
ByteString.read(InputStream in,
int byteCount)
Reads
count bytes from in and returns the result. |
ByteString |
BufferedSource.readByteString()
Removes all bytes bytes from this and returns them as a byte string.
|
ByteString |
Buffer.readByteString() |
ByteString |
BufferedSource.readByteString(long byteCount)
Removes
byteCount bytes from this and returns them as a byte string. |
ByteString |
Buffer.readByteString(long byteCount) |
ByteString |
ByteString.sha256()
Returns the SHA-256 hash of this byte string.
|
ByteString |
Buffer.snapshot()
Returns an immutable copy of this buffer as a byte string.
|
ByteString |
Buffer.snapshot(int byteCount)
Returns an immutable copy of the first
byteCount bytes of this buffer as a byte string. |
ByteString |
ByteString.substring(int beginIndex)
Returns a byte string that is a substring of this byte string, beginning at the specified
index until the end of this string.
|
ByteString |
ByteString.substring(int beginIndex,
int endIndex)
Returns a byte string that is a substring of this byte string, beginning at the specified
beginIndex and ends at the specified endIndex . |
ByteString |
ByteString.toAsciiLowercase()
Returns a byte string equal to this byte string, but with the bytes 'A'
through 'Z' replaced with the corresponding byte in 'a' through 'z'.
|
ByteString |
ByteString.toAsciiUppercase()
Returns a byte string equal to this byte string, but with the bytes 'a'
through 'z' replaced with the corresponding byte in 'A' through 'Z'.
|
Modifier and Type | Method and Description |
---|---|
int |
ByteString.compareTo(ByteString byteString) |
long |
BufferedSource.indexOf(ByteString bytes)
Returns the index of the first match for
bytes in the buffer. |
long |
Buffer.indexOf(ByteString bytes) |
long |
BufferedSource.indexOf(ByteString bytes,
long fromIndex)
Returns the index of the first match for
bytes in the buffer at or after fromIndex . |
long |
Buffer.indexOf(ByteString bytes,
long fromIndex) |
long |
BufferedSource.indexOfElement(ByteString targetBytes)
Returns the index of the first byte in
targetBytes in the buffer. |
long |
Buffer.indexOfElement(ByteString targetBytes) |
long |
BufferedSource.indexOfElement(ByteString targetBytes,
long fromIndex)
Returns the index of the first byte in
targetBytes in the buffer
at or after fromIndex . |
long |
Buffer.indexOfElement(ByteString targetBytes,
long fromIndex) |
boolean |
ByteString.rangeEquals(int offset,
ByteString other,
int otherOffset,
int byteCount)
Returns true if the bytes of this in
[offset..offset+byteCount) equal the bytes of
other in [otherOffset..otherOffset+byteCount) . |
Buffer |
Buffer.write(ByteString byteString) |
BufferedSink |
BufferedSink.write(ByteString byteString) |
Copyright © 2017. All Rights Reserved.