Class/Object

scodec.bits

BitVector

Related Docs: object BitVector | package bits

Permalink

sealed abstract class BitVector extends BitwiseOperations[BitVector, Long] with Serializable

Persistent vector of bits, stored as bytes.

Bits are numbered left to right, starting at 0.

Source
BitVector.scala
Linear Supertypes
Serializable, Serializable, BitwiseOperations[BitVector, Long], AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. BitVector
  2. Serializable
  3. Serializable
  4. BitwiseOperations
  5. AnyRef
  6. Any
Implicitly
  1. by GroupedOp
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def align: Bytes

    Permalink

    Produce a single flat Bytes by interpreting any non-byte-aligned appends or drops.

    Produce a single flat Bytes by interpreting any non-byte-aligned appends or drops. Unlike compact, the underlying ByteVector is not necessarily copied.

  2. abstract def drop(n: Long): BitVector

    Permalink

    Returns a vector of all bits in this vector except the first n bits.

    Returns a vector of all bits in this vector except the first n bits.

    The resulting vector's size is 0 max (size - n).

  3. abstract def get(n: Long): Boolean

    Permalink

    Returns true if the nth bit is high, false otherwise.

    Returns true if the nth bit is high, false otherwise.

    Exceptions thrown

    NoSuchElementException if n >= size

  4. abstract def getByte(n: Long): Byte

    Permalink

    Returns the nth byte, 0-indexed.

    Returns the nth byte, 0-indexed.

    Exceptions thrown

    NoSuchElementException if n >= bytes.size

  5. abstract def size: Long

    Permalink

    Returns number of bits in this vector.

  6. abstract def sizeLessThan(n: Long): Boolean

    Permalink

    Returns true if the size of this BitVector is less than n.

    Returns true if the size of this BitVector is less than n. Unlike size, this forces this BitVector from left to right, halting as soon as it has a definite answer.

  7. abstract def take(n: Long): BitVector

    Permalink

    Returns a vector of the first n bits of this vector.

    Returns a vector of the first n bits of this vector.

    The resulting vector's size is n min size.

    Note: if an n-bit vector is required, use the acquire method instead.

    See also

    acquire

  8. abstract def update(n: Long, high: Boolean): BitVector

    Permalink

    Returns a new bit vector with the nth bit high if high is true or low if high is false.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def &(other: BitVector): BitVector

    Permalink

    Returns a bitwise AND of this value with the specified value.

    Returns a bitwise AND of this value with the specified value.

    The resulting value's size is the minimum of this value's size and the specified value's size.

    Definition Classes
    BitwiseOperations
  4. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from BitVector to any2stringadd[BitVector] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  5. def ++(b2: BitVector): BitVector

    Permalink

    Returns a new bit vector representing this vector's contents followed by the specified vector's contents.

  6. final def +:(b: Boolean): BitVector

    Permalink

    Returns a new vector with the specified bit prepended.

  7. def ->[B](y: B): (BitVector, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from BitVector to ArrowAssoc[BitVector] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  8. final def :+(b: Boolean): BitVector

    Permalink

    Returns a new vector with the specified bit appended.

  9. final def <<(n: Long): BitVector

    Permalink

    Returns a value of the same size with each bit shifted to the left n bits.

    Returns a value of the same size with each bit shifted to the left n bits.

    Definition Classes
    BitwiseOperations
  10. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def ===(other: BitVector): Boolean

    Permalink

    Returns true if the specified BitVector has the same contents as this vector.

  12. final def >>(n: Long): BitVector

    Permalink

    Returns a value of the same size with each bit shifted to the right n bits where the n left-most bits are sign extended.

    Returns a value of the same size with each bit shifted to the right n bits where the n left-most bits are sign extended.

    Definition Classes
    BitwiseOperations
  13. final def >>>(n: Long): BitVector

    Permalink

    Returns a value of the same size with each bit shifted to the right n bits where the n left-most bits are low.

    Returns a value of the same size with each bit shifted to the right n bits where the n left-most bits are low.

    Definition Classes
    BitwiseOperations
  14. final def ^(other: BitVector): BitVector

    Permalink

    Returns a bitwise XOR of this value with the specified value.

    Returns a bitwise XOR of this value with the specified value.

    The resulting value's size is the minimum of this value's size and the specified value's size.

    Definition Classes
    BitwiseOperations
  15. def acquire(n: Long): Either[String, BitVector]

    Permalink

    Returns a vector whose contents are the results of taking the first n bits of this vector.

    Returns a vector whose contents are the results of taking the first n bits of this vector.

    If this vector does not contain at least n bits, an error message is returned.

    See also

    take

  16. final def acquireThen[R](n: Long)(err: (String) ⇒ R, f: (BitVector) ⇒ R): R

    Permalink

    Like aquire, but immediately consumes the Either via the pair of functions err and f.

    Like aquire, but immediately consumes the Either via the pair of functions err and f.

    See also

    acquire

  17. final def and(other: BitVector): BitVector

    Permalink

    Returns a bitwise AND of this bit vector with the specified bit vector.

    Returns a bitwise AND of this bit vector with the specified bit vector.

    The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.

    Definition Classes
    BitVectorBitwiseOperations
  18. final def apply(n: Long): Boolean

    Permalink

    Alias for get.

    Alias for get.

    See also

    get(Long)

  19. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  20. final def bytes: ByteVector

    Permalink

    Alias for toByteVector.

  21. final def checkBounds(n: Long): Unit

    Permalink
    Attributes
    protected
  22. final def clear(n: Long): BitVector

    Permalink

    Returns a new bit vector with the nth bit low (and all other bits unmodified).

  23. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def compact: Bytes

    Permalink

    Return a BitVector with the same contents as this, but based off a single ByteVector.

    Return a BitVector with the same contents as this, but based off a single ByteVector.

    This may involve copying data to a fresh ByteVector, but has the advantage that lookups index directly into a single ByteVector rather than traversing a logarithmic number of nodes in this tree.

    Calling this method on an already compacted vector is a no-op.

  25. final def consume[A](n: Long)(decode: (BitVector) ⇒ Either[String, A]): Either[String, (BitVector, A)]

    Permalink

    Consumes the first n bits of this vector and decodes them with the specified function, resulting in a vector of the remaining bits and the decoded value.

    Consumes the first n bits of this vector and decodes them with the specified function, resulting in a vector of the remaining bits and the decoded value. If this vector does not have n bits or an error occurs while decoding, an error is returned instead.

  26. final def consumeThen[R](n: Long)(err: (String) ⇒ R, f: (BitVector, BitVector) ⇒ R): R

    Permalink

    If this vector has at least n bits, returns f(take(n),drop(n)), otherwise calls err with a meaningful error message.

    If this vector has at least n bits, returns f(take(n),drop(n)), otherwise calls err with a meaningful error message. This function can be used to avoid intermediate allocations of Either objects when using acquire or consume directly.

    See also

    acquireThen

  27. final def containsSlice(slice: BitVector): Boolean

    Permalink

    Determines if the specified slice is in this vector.

  28. final def copy: Bytes

    Permalink

    Return a BitVector with the same contents as this, but based off a single flat ByteVector.

    Return a BitVector with the same contents as this, but based off a single flat ByteVector. This function is guaranteed to copy all the bytes in this BitVector, unlike compact, which may no-op if this BitVector already consists of a single ByteVector chunk.

  29. final def decodeAscii: Either[CharacterCodingException, String]

    Permalink

    Decodes this vector as a string using the US-ASCII charset.

  30. final def decodeString(implicit charset: Charset): Either[CharacterCodingException, String]

    Permalink

    Decodes this vector as a string using the implicitly available charset.

  31. final def decodeUtf8: Either[CharacterCodingException, String]

    Permalink

    Decodes this vector as a string using the UTF-8 charset.

  32. final def decrypt(ci: Cipher, key: Key, aparams: Option[AlgorithmParameters] = None)(implicit sr: SecureRandom): Either[GeneralSecurityException, BitVector]

    Permalink

    Decrypts this bit vector using the specified cipher and key.

    Decrypts this bit vector using the specified cipher and key.

    The last byte is zero padded if the size is not evenly divisible by 8.

    ci

    cipher to use for decryption

    key

    key to decrypt with

    aparams

    optional algorithm paramaters used for decryption (e.g., initialization vector)

    sr

    secure random

  33. final def deflate(level: Int = Deflater.DEFAULT_COMPRESSION, strategy: Int = Deflater.DEFAULT_STRATEGY, nowrap: Boolean = false, chunkSize: Int = 4096): BitVector

    Permalink

    Compresses this vector using ZLIB.

    Compresses this vector using ZLIB.

    The last byte is zero padded if the size is not evenly divisible by 8.

    level

    compression level, 0-9, with 0 disabling compression and 9 being highest level of compression -- see java.util.zip.Deflater for details

    strategy

    compression strategy -- see java.util.zip.Deflater for details

    nowrap

    if true, ZLIB header and checksum will not be used

    chunkSize

    buffer size, in bytes, to use when compressing

  34. final def digest(digest: MessageDigest): BitVector

    Permalink

    Computes a digest of this bit vector.

    Computes a digest of this bit vector.

    Exceptions thrown from the underlying JCA API are propagated.

    The last byte is zero padded if the size is not evenly divisible by 8.

    digest

    digest to use

  35. final def digest(algorithm: String): BitVector

    Permalink

    Computes a digest of this bit vector.

    Computes a digest of this bit vector.

    Exceptions thrown from the underlying JCA API are propagated.

    The last byte is zero padded if the size is not evenly divisible by 8.

    algorithm

    digest algorithm to use

  36. final def dropRight(n: Long): BitVector

    Permalink

    Returns a vector of all bits in this vector except the last n bits.

    Returns a vector of all bits in this vector except the last n bits.

    The resulting vector's size is 0 max (size - n).

  37. final def encrypt(ci: Cipher, key: Key, aparams: Option[AlgorithmParameters] = None)(implicit sr: SecureRandom): Either[GeneralSecurityException, BitVector]

    Permalink

    Encrypts this bit vector using the specified cipher and key.

    Encrypts this bit vector using the specified cipher and key.

    The last byte is zero padded if the size is not evenly divisible by 8.

    ci

    cipher to use for encryption

    key

    key to encrypt with

    aparams

    optional algorithm paramaters used for encryption (e.g., initialization vector)

    sr

    secure random

  38. final def endsWith(b: BitVector): Boolean

    Permalink

    Returns true if this bit vector ends with the specified vector.

  39. def ensuring(cond: (BitVector) ⇒ Boolean, msg: ⇒ Any): BitVector

    Permalink
    Implicit information
    This member is added by an implicit conversion from BitVector to Ensuring[BitVector] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  40. def ensuring(cond: (BitVector) ⇒ Boolean): BitVector

    Permalink
    Implicit information
    This member is added by an implicit conversion from BitVector to Ensuring[BitVector] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  41. def ensuring(cond: Boolean, msg: ⇒ Any): BitVector

    Permalink
    Implicit information
    This member is added by an implicit conversion from BitVector to Ensuring[BitVector] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  42. def ensuring(cond: Boolean): BitVector

    Permalink
    Implicit information
    This member is added by an implicit conversion from BitVector to Ensuring[BitVector] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  43. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  44. final def equals(other: Any): Boolean

    Permalink

    Returns true if the specified value is a BitVector with the same contents as this vector.

    Returns true if the specified value is a BitVector with the same contents as this vector.

    Definition Classes
    BitVector → AnyRef → Any
    See also

    BitVector.===

  45. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  46. final def force: BitVector

    Permalink

    Forces any Suspend nodes in this BitVector and ensures the tree is balanced.

  47. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from BitVector to StringFormat[BitVector] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  48. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  49. final def grouped(n: Long): Iterator[BitVector]

    Permalink

    Converts this vector in to a sequence of n-bit vectors.

    Converts this vector in to a sequence of n-bit vectors.

    Implicit information
    This member is added by an implicit conversion from BitVector to GroupedOp performed by method GroupedOp in scodec.bits.BitVector.
    Definition Classes
    GroupedOp
  50. final lazy val hashCode: Int

    Permalink

    Calculates the hash code of this vector.

    Calculates the hash code of this vector. The result is cached.

    Definition Classes
    BitVector → AnyRef → Any
  51. final def head: Boolean

    Permalink

    Returns the first bit of this vector or throws if vector is emtpy.

  52. final def headOption: Option[Boolean]

    Permalink

    Returns the first bit of this vector or None if vector is emtpy.

  53. def iff(other: BitVector): BitVector

    Permalink

    Returns a bitwise if-and-only-if of this value with the specified value.

    Returns a bitwise if-and-only-if of this value with the specified value.

    The resulting value's size is the minimum of this value's size and the specified value's size.

    Definition Classes
    BitwiseOperations
  54. def implies(other: BitVector): BitVector

    Permalink

    Returns a bitwise implication of this value with the specified value.

    Returns a bitwise implication of this value with the specified value.

    The resulting value's size is the minimum of this value's size and the specified value's size.

    Definition Classes
    BitwiseOperations
  55. final def indexOfSlice(slice: BitVector, from: Long): Long

    Permalink

    Finds the first index after from of the specified bit pattern in this vector.

    Finds the first index after from of the specified bit pattern in this vector.

    returns

    index of slice or -1 if not found

  56. final def indexOfSlice(slice: BitVector): Long

    Permalink

    Finds the first index of the specified bit pattern in this vector.

    Finds the first index of the specified bit pattern in this vector.

    returns

    index of slice or -1 if not found

  57. final def inflate(chunkSize: Int = 4096): Either[DataFormatException, BitVector]

    Permalink

    Decompresses this vector using ZLIB.

    Decompresses this vector using ZLIB.

    The last byte is zero padded if the size is not evenly divisible by 8.

    chunkSize

    buffer size, in bytes, to use when compressing

  58. final def init: BitVector

    Permalink

    Returns a vector of all bits in this vector except the last bit.

  59. final def insert(idx: Long, b: Boolean): BitVector

    Permalink

    Returns a vector with the specified bit inserted at the specified index.

  60. final def intSize: Option[Int]

    Permalink

    Returns the number of bits in this vector, or None if the size does not fit into an Int.

  61. final def invertReverseByteOrder: BitVector

    Permalink

    Inverse of reverseByteOrder.

  62. final def isEmpty: Boolean

    Permalink

    Returns true if this vector has no bits.

  63. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  64. final def last: Boolean

    Permalink

    Returns the last bit in this vector or throws if vector is empty.

  65. final def lastOption: Option[Boolean]

    Permalink

    Returns the last bit in this vector or returns None if vector is empty.

  66. final def length: Long

    Permalink

    Alias for size.

  67. final def lift(n: Long): Option[Boolean]

    Permalink

    Returns Some(true) if the nth bit is high, Some(false) if low, and None if n >= size.

  68. final def mapBytes(f: (ByteVector) ⇒ ByteVector): BitVector

    Permalink
    Attributes
    protected
  69. def nand(other: BitVector): BitVector

    Permalink

    Returns a bitwise NAND of this value with the specified value.

    Returns a bitwise NAND of this value with the specified value.

    The resulting value's size is the minimum of this value's size and the specified value's size.

    Definition Classes
    BitwiseOperations
  70. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  71. final def nonEmpty: Boolean

    Permalink

    Returns true if this vector has a non-zero number of bits.

  72. def nor(other: BitVector): BitVector

    Permalink

    Returns a bitwise NOR of this value with the specified value.

    Returns a bitwise NOR of this value with the specified value.

    The resulting value's size is the minimum of this value's size and the specified value's size.

    Definition Classes
    BitwiseOperations
  73. final def not: BitVector

    Permalink

    Returns a bitwise complement of this bit vector.

    Returns a bitwise complement of this bit vector.

    Definition Classes
    BitVectorBitwiseOperations
  74. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  75. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  76. final def or(other: BitVector): BitVector

    Permalink

    Returns a bitwise OR of this bit vector with the specified bit vector.

    Returns a bitwise OR of this bit vector with the specified bit vector.

    The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.

    Definition Classes
    BitVectorBitwiseOperations
  77. final def outOfBounds(n: Long): Nothing

    Permalink
    Attributes
    protected
  78. final def padLeft(n: Long): BitVector

    Permalink

    Returns an n-bit vector whose contents are 0 or more low bits followed by this vector's contents.

    Returns an n-bit vector whose contents are 0 or more low bits followed by this vector's contents.

    Exceptions thrown

    IllegalArgumentException if n < size

  79. final def padRight(n: Long): BitVector

    Permalink

    Returns an n-bit vector whose contents are 0 or more low bits followed by this vector's contents.

    Returns an n-bit vector whose contents are 0 or more low bits followed by this vector's contents.

    Exceptions thrown

    IllegalArgumentException if n < size

  80. final def padTo(n: Long): BitVector

    Permalink

    Alias for padRight.

    Alias for padRight.

    Exceptions thrown

    IllegalArgumentException if n < size

  81. final def patch(idx: Long, b: BitVector): BitVector

    Permalink

    Returns a vector with the specified bit vector replacing bits [idx, idx + b.size].

  82. final def populationCount: Long

    Permalink

    Returns the number of bits that are high.

  83. final def reverse: BitVector

    Permalink

    Reverse the bits of this vector.

  84. final def reverseBitOrder: BitVector

    Permalink

    Returns a new vector of the same size with the bit order reversed.

  85. final def reverseByteOrder: BitVector

    Permalink

    Returns a new vector of the same size with the byte order reversed.

    Returns a new vector of the same size with the byte order reversed.

    Note that reverseByteOrder.reverseByteOrder == identity only when size is evenly divisble by 8. To invert reverseByteOrder for an arbitrary size, use invertReverseByteOrder.

  86. final def rotateLeft(n: Long): BitVector

    Permalink

    Returns a bit vector of the same size with each bit circularly shifted to the left n bits.

    Returns a bit vector of the same size with each bit circularly shifted to the left n bits.

    Definition Classes
    BitVectorBitwiseOperations
  87. final def rotateRight(n: Long): BitVector

    Permalink

    Returns a bit vector of the same size with each bit circularly shifted to the right n bits.

    Returns a bit vector of the same size with each bit circularly shifted to the right n bits.

    Definition Classes
    BitVectorBitwiseOperations
  88. val self: BitVector

    Permalink
    Implicit information
    This member is added by an implicit conversion from BitVector to GroupedOp performed by method GroupedOp in scodec.bits.BitVector.
    Definition Classes
    GroupedOp
  89. final def set(n: Long): BitVector

    Permalink

    Returns a new bit vector with the nth bit high (and all other bits unmodified).

  90. final def shiftLeft(n: Long): BitVector

    Permalink

    Returns a bit vector of the same size with each bit shifted to the left n bits.

    Returns a bit vector of the same size with each bit shifted to the left n bits.

    Definition Classes
    BitVectorBitwiseOperations
  91. final def shiftRight(n: Long, signExtension: Boolean): BitVector

    Permalink

    Returns a bit vector of the same size with each bit shifted to the right n bits.

    Returns a bit vector of the same size with each bit shifted to the right n bits.

    signExtension

    whether the n left-msot bits should take on the value of bit 0

    Definition Classes
    BitVectorBitwiseOperations
  92. final def sizeGreaterThan(n: Long): Boolean

    Permalink

    Returns true if the size of this BitVector is greater than n.

    Returns true if the size of this BitVector is greater than n. Unlike size, this forces this BitVector from left to right, halting as soon as it has a definite answer.

  93. final def sizeGreaterThanOrEqual(n: Long): Boolean

    Permalink

    Returns true if the size of this BitVector is greater than or equal to n.

    Returns true if the size of this BitVector is greater than or equal to n. Unlike size, this forces this BitVector from left to right, halting as soon as it has a definite answer.

  94. final def sizeLessThanOrEqual(n: Long): Boolean

    Permalink

    Returns true if the size of this BitVector is less than or equal to n.

    Returns true if the size of this BitVector is less than or equal to n. Unlike size, this forces this BitVector from left to right, halting as soon as it has a definite answer.

  95. final def slice(from: Long, until: Long): BitVector

    Permalink

    Returns a vector made up of the bits starting at index from up to index until, not including the index until.

  96. final def sliceToByte(start: Long, bits: Int, signed: Boolean = true): Byte

    Permalink

    Convert a slice of bits from this vector (start until start+bits) to a Byte.

    Convert a slice of bits from this vector (start until start+bits) to a Byte.

    signed

    whether sign extension should be performed

    Exceptions thrown

    IllegalArgumentException if the slice refers to indices that are out of range

  97. final def sliceToInt(start: Long, bits: Int, signed: Boolean = true, ordering: ByteOrdering = ByteOrdering.BigEndian): Int

    Permalink

    Convert a slice of bits from this vector (start until start+bits) to an Int.

    Convert a slice of bits from this vector (start until start+bits) to an Int.

    signed

    whether sign extension should be performed

    ordering

    order bytes should be processed in

    Exceptions thrown

    IllegalArgumentException if the slice refers to indices that are out of range

  98. final def sliceToLong(start: Long, bits: Int, signed: Boolean = true, ordering: ByteOrdering = ByteOrdering.BigEndian): Long

    Permalink

    Convert a slice of bits from this vector (start until start+bits) to a Long.

    Convert a slice of bits from this vector (start until start+bits) to a Long.

    signed

    whether sign extension should be performed

    ordering

    order bytes should be processed in

    Exceptions thrown

    IllegalArgumentException if the slice refers to indices that are out of range

  99. final def sliceToShort(start: Long, bits: Int, signed: Boolean = true, ordering: ByteOrdering = ByteOrdering.BigEndian): Short

    Permalink

    Convert a slice of bits from this vector (start until start+bits) to a Short.

    Convert a slice of bits from this vector (start until start+bits) to a Short.

    signed

    whether sign extension should be performed

    ordering

    order bytes should be processed in

    Exceptions thrown

    IllegalArgumentException if the slice refers to indices that are out of range

  100. final def splice(idx: Long, b: BitVector): BitVector

    Permalink

    Returns a vector with the specified bit vector inserted at the specified index.

  101. final def splitAt(n: Long): (BitVector, BitVector)

    Permalink

    Returns a pair of vectors that is equal to (take(n), drop(n)).

  102. final def startsWith(b: BitVector): Boolean

    Permalink

    Returns true if this bit vector starts with the specified vector.

  103. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  104. final def tail: BitVector

    Permalink

    Returns a vector of all bits in this vector except the first bit.

  105. final def takeRight(n: Long): BitVector

    Permalink

    Returns a vector of the last n bits of this vector.

    Returns a vector of the last n bits of this vector.

    The resulting vector's size is n min size.

  106. final def toBase58(alphabet: Alphabet): String

    Permalink

    Converts the contents of this vector to a base 58 string using the specified alphabet.

    Converts the contents of this vector to a base 58 string using the specified alphabet.

    the order is assumed to be the same as (Bitcoin)https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart

  107. final def toBase58: String

    Permalink

    Converts the contents of this vector to a base 58 string.

    Converts the contents of this vector to a base 58 string.

    the order is assumed to be the same as (Bitcoin)https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart

  108. final def toBase64(alphabet: Base64Alphabet): String

    Permalink

    Converts the contents of this vector to a base 64 string using the specified alphabet.

    Converts the contents of this vector to a base 64 string using the specified alphabet.

    The last byte is right-padded with zeros if the size is not evenly divisible by 8.

  109. final def toBase64: String

    Permalink

    Converts the contents of this vector to a base 64 string.

    Converts the contents of this vector to a base 64 string.

    The last byte is right-padded with zeros if the size is not evenly divisible by 8.

  110. final def toBin(alphabet: BinaryAlphabet): String

    Permalink

    Converts the contents of this bit vector to a binary string of size digits.

  111. final def toBin: String

    Permalink

    Converts the contents of this bit vector to a binary string of size digits.

  112. final def toByte(signed: Boolean = true): Byte

    Permalink

    Converts the contents of this vector to a byte.

    Converts the contents of this vector to a byte.

    signed

    whether sign extension should be performed

    Exceptions thrown

    IllegalArgumentException if size is greater than 8

  113. final def toByteArray: Array[Byte]

    Permalink

    Converts the contents of this vector to a byte array.

    Converts the contents of this vector to a byte array.

    If this vector's size does not divide evenly by 8, the last byte of the returned vector will be zero-padded to the right.

  114. final def toByteBuffer: ByteBuffer

    Permalink

    Converts the contents of this vector to a java.nio.ByteBuffer.

    Converts the contents of this vector to a java.nio.ByteBuffer.

    The returned buffer is freshly allocated with limit set to the minimum number of bytes needed to represent the contents of this vector, position set to zero, and remaining set to the limit.

    See also

    toByteVector

  115. final def toByteVector: ByteVector

    Permalink

    Converts the contents of this vector to a byte vector.

    Converts the contents of this vector to a byte vector.

    If this vector's size does not divide evenly by 8, the last byte of the returned vector will be zero-padded to the right.

  116. final def toHex(alphabet: HexAlphabet): String

    Permalink

    Converts the contents of this bit vector to a hexadecimal string of ceil(size / 4) nibbles.

    Converts the contents of this bit vector to a hexadecimal string of ceil(size / 4) nibbles.

    The last nibble is right-padded with zeros if the size is not evenly divisible by 4.

  117. final def toHex: String

    Permalink

    Converts the contents of this bit vector to a hexadecimal string of ceil(size / 4) nibbles.

    Converts the contents of this bit vector to a hexadecimal string of ceil(size / 4) nibbles.

    The last nibble is right-padded with zeros if the size is not evenly divisible by 4.

  118. final def toIndexedSeq: IndexedSeq[Boolean]

    Permalink

    Return the sequence of bits in this vector.

    Return the sequence of bits in this vector. The returned IndexedSeq is just a view; nothing is actually copied.

    Exceptions thrown

    IllegalArgumentException if this vector's size exceeds Int.MaxValue

    See also

    toIndexedSeq

    acquire

  119. final def toInt(signed: Boolean = true, ordering: ByteOrdering = ByteOrdering.BigEndian): Int

    Permalink

    Converts the contents of this vector to an int.

    Converts the contents of this vector to an int.

    signed

    whether sign extension should be performed

    ordering

    order bytes should be processed in

    Exceptions thrown

    IllegalArgumentException if size is greater than 32

  120. final def toLong(signed: Boolean = true, ordering: ByteOrdering = ByteOrdering.BigEndian): Long

    Permalink

    Converts the contents of this vector to a long.

    Converts the contents of this vector to a long.

    signed

    whether sign extension should be performed

    ordering

    order bytes should be processed in

    Exceptions thrown

    IllegalArgumentException if size is greater than 64

  121. final def toShort(signed: Boolean = true, ordering: ByteOrdering = ByteOrdering.BigEndian): Short

    Permalink

    Converts the contents of this vector to a short.

    Converts the contents of this vector to a short.

    signed

    whether sign extension should be performed

    ordering

    order bytes should be processed in

    Exceptions thrown

    IllegalArgumentException if size is greater than 16

  122. final def toString(): String

    Permalink

    Display the size and bytes of this BitVector.

    Display the size and bytes of this BitVector. For bit vectors beyond a certain size, only a hash of the contents are shown.

    Definition Classes
    BitVector → AnyRef → Any
  123. final def toUUID: UUID

    Permalink

    Converts the contents of this bit vector to a UUID.

    Converts the contents of this bit vector to a UUID.

    Exceptions thrown

    IllegalArgumentException if size is not exactly 128.

  124. final def unary_~(): BitVector

    Permalink

    Returns a bitwise complement of this value.

    Returns a bitwise complement of this value.

    Definition Classes
    BitwiseOperations
  125. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  126. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  127. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  128. final def writeReplace(): AnyRef

    Permalink
    Attributes
    protected
  129. final def xor(other: BitVector): BitVector

    Permalink

    Returns a bitwise XOR of this bit vector with the specified bit vector.

    Returns a bitwise XOR of this bit vector with the specified bit vector.

    The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.

    Definition Classes
    BitVectorBitwiseOperations
  130. final def |(other: BitVector): BitVector

    Permalink

    Returns a bitwise OR of this value with the specified value.

    Returns a bitwise OR of this value with the specified value.

    The resulting value's size is the minimum of this value's size and the specified value's size.

    Definition Classes
    BitwiseOperations
  131. def [B](y: B): (BitVector, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from BitVector to ArrowAssoc[BitVector] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Serializable

Inherited from Serializable

Inherited from BitwiseOperations[BitVector, Long]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion GroupedOp from BitVector to GroupedOp

Inherited by implicit conversion any2stringadd from BitVector to any2stringadd[BitVector]

Inherited by implicit conversion StringFormat from BitVector to StringFormat[BitVector]

Inherited by implicit conversion Ensuring from BitVector to Ensuring[BitVector]

Inherited by implicit conversion ArrowAssoc from BitVector to ArrowAssoc[BitVector]

Collection Like Methods

Bitwise Operations

Conversions

Cryptography

Ungrouped