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() |
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 |
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() |
public static final ByteString$ MODULE$
public ByteString apply(byte[] bytes)
public ByteString apply(scala.collection.Seq<java.lang.Object> bytes)
public <T> ByteString apply(scala.collection.Seq<T> bytes, scala.math.Integral<T> num)
public ByteString apply(java.nio.ByteBuffer bytes)
public ByteString apply(java.lang.String string)
public ByteString apply(java.lang.String string, java.lang.String charset)
public ByteString fromArray(byte[] array)
public ByteString fromArray(byte[] array, int offset, int length)
public ByteString fromString(java.lang.String string)
public ByteString fromString(java.lang.String string, java.lang.String charset)
public ByteString fromByteBuffer(java.nio.ByteBuffer buffer)
public ByteString empty()
public ByteStringBuilder newBuilder()
public scala.collection.generic.CanBuildFrom<scala.collection.TraversableOnce<java.lang.Object>,java.lang.Object,ByteString> canBuildFrom()