object ByteVector extends Serializable
- Grouped
- Alphabetic
- By Inheritance
- ByteVector
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(bs: GenTraversableOnce[Byte]): ByteVector
Constructs a
ByteVectorfrom ascala.collectionsource of bytes. -
def
apply(buffer: ByteBuffer): ByteVector
Constructs a
ByteVectorfrom aByteBuffer.Constructs a
ByteVectorfrom aByteBuffer. The givenByteBufferis is copied to ensure the resultingByteVectoris immutable. If this is not desired, useByteVector.view. -
def
apply(bytes: Array[Byte], offset: Int, length: Int): ByteVector
Constructs a
ByteVectorfrom anArray[Byte], an offset, and a length.Constructs a
ByteVectorfrom anArray[Byte], an offset, and a length. The givenArray[Byte]is copied to ensure the resultingByteVectoris immutable. If this is not desired, useByteVector.view. -
def
apply(bytes: Array[Byte]): ByteVector
Constructs a
ByteVectorfrom anArray[Byte].Constructs a
ByteVectorfrom anArray[Byte]. The givenArray[Byte]is copied to ensure the resultingByteVectoris immutable. If this is not desired, useByteVector.view. -
def
apply(bytes: Vector[Byte]): ByteVector
Constructs a
ByteVectorfrom a collection of bytes. -
def
apply[A](bytes: A*)(implicit arg0: Integral[A]): ByteVector
Constructs a
ByteVectorfrom a list of literal bytes.Constructs a
ByteVectorfrom a list of literal bytes. Only the least significant byte is used of each integral value. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
concat(bvs: GenTraversableOnce[ByteVector]): ByteVector
Concatenates all the given
ByteVectors into a single instance. -
val
empty: ByteVector
Empty byte vector.
-
def
encodeAscii(str: String): Either[CharacterCodingException, ByteVector]
Encodes the specified string to a
ByteVectorusing the US-ASCII charset. -
def
encodeString(str: String)(implicit charset: Charset): Either[CharacterCodingException, ByteVector]
Encodes the specified string to a
ByteVectorusing the implicitly availableCharset. -
def
encodeUtf8(str: String): Either[CharacterCodingException, ByteVector]
Encodes the specified string to a
ByteVectorusing the UTF-8 charset. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fill[A](size: Long)(b: A)(implicit arg0: Integral[A]): ByteVector
Constructs a
ByteVectorof the given size, where all bytes have the valueb. -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromBase64(str: String, alphabet: Base64Alphabet = Bases.Alphabets.Base64): Option[ByteVector]
Constructs a
ByteVectorfrom a base 64 string or returnsNoneif the string is not valid base 64.Constructs a
ByteVectorfrom a base 64 string or returnsNoneif the string is not valid base 64.The string may contain whitespace characters.
-
def
fromBase64Descriptive(str: String, alphabet: Base64Alphabet = Bases.Alphabets.Base64): Either[String, ByteVector]
Constructs a
ByteVectorfrom a base 64 string or returns an error message if the string is not valid base 64.Constructs a
ByteVectorfrom a base 64 string or returns an error message if the string is not valid base 64.The string may contain whitespace characters.
-
def
fromBin(str: String, alphabet: BinaryAlphabet = Bases.Alphabets.Binary): Option[ByteVector]
Constructs a
ByteVectorfrom a binary string or returnsNoneif the string is not valid binary.Constructs a
ByteVectorfrom a binary string or returnsNoneif the string is not valid binary.The string may start with a
0band it may contain whitespace or underscore characters. -
def
fromBinDescriptive(str: String, alphabet: BinaryAlphabet = Bases.Alphabets.Binary): Either[String, ByteVector]
Constructs a
ByteVectorfrom a binary string or returns an error message if the string is not valid binary.Constructs a
ByteVectorfrom a binary string or returns an error message if the string is not valid binary.The string may start with a
0band it may contain whitespace or underscore characters. -
def
fromByte(b: Byte): ByteVector
Constructs a bit vector with the 2's complement encoding of the specified byte.
Constructs a bit vector with the 2's complement encoding of the specified byte.
- b
value to encode
-
def
fromHex(str: String, alphabet: HexAlphabet = Bases.Alphabets.HexLowercase): Option[ByteVector]
Constructs a
ByteVectorfrom a hexadecimal string or returnsNoneif the string is not valid hexadecimal.Constructs a
ByteVectorfrom a hexadecimal string or returnsNoneif the string is not valid hexadecimal.The string may start with a
0xand it may contain whitespace or underscore characters. -
def
fromHexDescriptive(str: String, alphabet: HexAlphabet = Bases.Alphabets.HexLowercase): Either[String, ByteVector]
Constructs a
ByteVectorfrom a hexadecimal string or returns an error message if the string is not valid hexadecimal.Constructs a
ByteVectorfrom a hexadecimal string or returns an error message if the string is not valid hexadecimal.The string may start with a
0xand it may contain whitespace or underscore characters. -
def
fromInt(i: Int, size: Int = 4, ordering: ByteOrdering = ByteOrdering.BigEndian): ByteVector
Constructs a bit vector with the 2's complement encoding of the specified value.
Constructs a bit vector with the 2's complement encoding of the specified value.
- i
value to encode
- size
size of vector (<= 4)
- ordering
byte ordering of vector
-
def
fromLong(l: Long, size: Int = 8, ordering: ByteOrdering = ByteOrdering.BigEndian): ByteVector
Constructs a bit vector with the 2's complement encoding of the specified value.
Constructs a bit vector with the 2's complement encoding of the specified value.
- l
value to encode
- size
size of vector (<= 8)
- ordering
byte ordering of vector
-
def
fromShort(s: Short, size: Int = 2, ordering: ByteOrdering = ByteOrdering.BigEndian): ByteVector
Constructs a bit vector with the 2's complement encoding of the specified value.
Constructs a bit vector with the 2's complement encoding of the specified value.
- s
value to encode
- size
size of vector (<= 2)
- ordering
byte ordering of vector
-
def
fromValidBase64(str: String, alphabet: Base64Alphabet = Bases.Alphabets.Base64): ByteVector
Constructs a
ByteVectorfrom a base 64 string or throws an IllegalArgumentException if the string is not valid base 64.Constructs a
ByteVectorfrom a base 64 string or throws an IllegalArgumentException if the string is not valid base 64.The string may contain whitespace characters.
- Exceptions thrown
IllegalArgumentExceptionif the string is not valid base 64
-
def
fromValidBin(str: String, alphabet: BinaryAlphabet = Bases.Alphabets.Binary): ByteVector
Constructs a
ByteVectorfrom a binary string or throws an IllegalArgumentException if the string is not valid binary.Constructs a
ByteVectorfrom a binary string or throws an IllegalArgumentException if the string is not valid binary.The string may start with a
0band it may contain whitespace or underscore characters.- Exceptions thrown
IllegalArgumentExceptionif the string is not valid binary
-
def
fromValidHex(str: String, alphabet: HexAlphabet = Bases.Alphabets.HexLowercase): ByteVector
Constructs a
ByteVectorfrom a hexadecimal string or throws an IllegalArgumentException if the string is not valid hexadecimal.Constructs a
ByteVectorfrom a hexadecimal string or throws an IllegalArgumentException if the string is not valid hexadecimal.The string may start with a
0xand it may contain whitespace or underscore characters.- Exceptions thrown
IllegalArgumentExceptionif the string is not valid hexadecimal
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
high(size: Long): ByteVector
Constructs a
ByteVectorof the given size, where all bytes have the value0xff. -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
low(size: Long): ByteVector
Constructs a
ByteVectorof the given size, where all bytes have the value0. -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
view(bytes: ByteBuffer): ByteVector
Constructs a
ByteVectorfrom aByteBuffer.Constructs a
ByteVectorfrom aByteBuffer. Unlikeapply, this does not make a copy of the input buffer, so callers should take care not to modify the contents of the buffer passed to this function. -
def
view(bytes: Array[Byte]): ByteVector
Constructs a
ByteVectorfrom anArray[Byte].Constructs a
ByteVectorfrom anArray[Byte]. Unlikeapply, this does not make a copy of the input array, so callers should take care not to modify the contents of the array passed to this function. -
def
viewAt(at: (Long) ⇒ Byte, size: Long): ByteVector
Constructs a
ByteVectorfrom a function fromInt => Byteand a size. -
def
viewI(at: (Long) ⇒ Int, size: Long): ByteVector
Constructs a
ByteVectorfrom a function fromLong => Intand a size, where theIntreturned byatmust fit in aByte. -
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )