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 . |
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 |
Buffer.readByteString() |
ByteString |
BufferedSource.readByteString()
Removes all bytes bytes from this and returns them as a byte string.
|
ByteString |
Buffer.readByteString(long byteCount) |
ByteString |
BufferedSource.readByteString(long byteCount)
Removes
byteCount bytes from this and returns them as a byte string. |
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 |
---|---|
long |
Buffer.indexOfElement(ByteString targetBytes) |
long |
BufferedSource.indexOfElement(ByteString targetBytes)
Returns the index of the first byte in
targetBytes in the buffer. |
long |
Buffer.indexOfElement(ByteString targetBytes,
long fromIndex) |
long |
BufferedSource.indexOfElement(ByteString targetBytes,
long fromIndex)
Returns the index of the first byte in
targetBytes in the buffer
at or after fromIndex . |
Buffer |
Buffer.write(ByteString byteString) |
BufferedSink |
BufferedSink.write(ByteString byteString) |
Copyright © 2015. All rights reserved.