public class ByteString$
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ByteString$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
ByteString$() |
Modifier and Type | Method and Description |
---|---|
ByteString |
apply(byte[] bytes)
Creates a new ByteString by copying a byte array.
|
ByteString |
apply(java.nio.ByteBuffer bytes)
Creates a new ByteString by copying bytes from a ByteBuffer.
|
ByteString |
apply(scala.collection.Seq<java.lang.Object> bytes)
Creates a new ByteString by copying bytes.
|
<T> ByteString |
apply(scala.collection.Seq<T> bytes,
scala.math.Integral<T> num)
Creates a new ByteString by converting from integral numbers to bytes.
|
ByteString |
apply(java.lang.String string)
Creates a new ByteString by encoding a String as UTF-8.
|
ByteString |
apply(java.lang.String string,
java.lang.String charset)
Creates a new ByteString by encoding a String with a charset.
|
scala.collection.generic.CanBuildFrom<scala.collection.TraversableOnce<java.lang.Object>,java.lang.Object,ByteString> |
canBuildFrom() |
ByteStringBuilder |
createBuilder()
Java API
|
ByteString |
empty() |
ByteString |
fromArray(byte[] array)
Creates a new ByteString by copying a byte array.
|
ByteString |
fromArray(byte[] array,
int offset,
int length)
Creates a new ByteString by copying length bytes starting at offset from
an Array.
|
ByteString |
fromByteBuffer(java.nio.ByteBuffer buffer)
Creates a new ByteString by copying bytes out of a ByteBuffer.
|
ByteString |
fromInts(int... array)
JAVA API
Creates a new ByteString by copying an int array by converting from integral numbers to bytes.
|
ByteString |
fromInts(scala.collection.Seq<java.lang.Object> array)
JAVA API
Creates a new ByteString by copying an int array by converting from integral numbers to bytes.
|
ByteString |
fromString(java.lang.String string)
Creates a new ByteString which will contain the UTF-8 representation of the given String
|
ByteString |
fromString(java.lang.String string,
java.lang.String charset)
Creates a new ByteString which will contain the representation of the given String in the given charset
|
ByteStringBuilder |
newBuilder() |
java.lang.String |
UTF_8()
Standard "UTF-8" charset
|
public static final ByteString$ MODULE$
public ByteString fromInts(int... array)
array
- (undocumented)public ByteString apply(byte[] bytes)
bytes
- (undocumented)public ByteString apply(scala.collection.Seq<java.lang.Object> bytes)
bytes
- (undocumented)public <T> ByteString apply(scala.collection.Seq<T> bytes, scala.math.Integral<T> num)
bytes
- (undocumented)num
- (undocumented)public ByteString apply(java.nio.ByteBuffer bytes)
bytes
- (undocumented)public ByteString apply(java.lang.String string)
string
- (undocumented)public ByteString apply(java.lang.String string, java.lang.String charset)
string
- (undocumented)charset
- (undocumented)public ByteString fromArray(byte[] array)
array
- (undocumented)public ByteString fromArray(byte[] array, int offset, int length)
array
- (undocumented)offset
- (undocumented)length
- (undocumented)public ByteString fromInts(scala.collection.Seq<java.lang.Object> array)
array
- (undocumented)public ByteString fromString(java.lang.String string)
string
- (undocumented)public ByteString fromString(java.lang.String string, java.lang.String charset)
string
- (undocumented)charset
- (undocumented)public java.lang.String UTF_8()
public ByteString fromByteBuffer(java.nio.ByteBuffer buffer)
buffer
- (undocumented)public ByteString empty()
public ByteStringBuilder newBuilder()
public ByteStringBuilder createBuilder()
public scala.collection.generic.CanBuildFrom<scala.collection.TraversableOnce<java.lang.Object>,java.lang.Object,ByteString> canBuildFrom()