ByteString1C
A compact (unsliced) and unfragmented ByteString, implementation of ByteString1C.
Attributes
- Graph
- Supertypes
- class CompactByteStringtrait Serializableclass ByteStringtrait IndexedSeq[Byte]trait IndexedSeq[Byte]trait Seq[Byte]trait Seq[Byte]trait Equalstrait PartialFunction[Int, Byte]trait Int => Bytetrait Iterable[Byte]trait Iterable[Byte]trait IterableFactoryDefaults[Byte, IndexedSeq]trait IterableOnce[Byte]class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Efficiently concatenate another ByteString.
Returns a read-only ByteBuffer that directly wraps this ByteString if it is not fragmented.
Returns a read-only ByteBuffer that directly wraps this ByteString if it is not fragmented.
Attributes
- Definition Classes
Scala API: Returns an immutable Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments. Will always have at least one entry.
Scala API: Returns an immutable Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments. Will always have at least one entry.
Attributes
- Definition Classes
Attributes
- Definition Classes
- ByteString -> IterableOnceOps
Copy as many bytes as possible to a ByteBuffer, starting from it's current position. This method will not overflow the buffer.
Copy as many bytes as possible to a ByteBuffer, starting from it's current position. This method will not overflow the buffer.
Attributes
- buffer
a ByteBuffer to copy bytes to
- Returns:
the number of bytes actually copied
- Definition Classes
Attributes
- Definition Classes
Decodes this ByteString using a charset to produce a String.
If you have a Charset instance available, use decodeString(charset: java.nio.charset.Charset
instead.
Decodes this ByteString using a charset to produce a String.
If you have a Charset instance available, use decodeString(charset: java.nio.charset.Charset
instead.
Attributes
- Definition Classes
Decodes this ByteString using a charset to produce a String.
Avoids Charset.forName lookup in String internals, thus is preferable to decodeString(charset: String)
.
Decodes this ByteString using a charset to produce a String.
Avoids Charset.forName lookup in String internals, thus is preferable to decodeString(charset: String)
.
Attributes
- Definition Classes
Attributes
- Definition Classes
Attributes
- Definition Classes
Returns a ByteString which is the Base64 representation of this ByteString
Returns a ByteString which is the Base64 representation of this ByteString
Attributes
- Definition Classes
Attributes
- Definition Classes
- ByteString -> SeqOps
Attributes
- Definition Classes
Attributes
- Definition Classes
- SeqOps
Attributes
- Definition Classes
Attributes
- Definition Classes
Unsafe API: Use only in situations you are completely confident that this is what you need, and that you understand the implications documented below.
Unsafe API: Use only in situations you are completely confident that this is what you need, and that you understand the implications documented below.
If the ByteString is backed by a single array it is returned without any copy. If it is backed by a rope of multiple ByteString instances a new array will be allocated and the contents will be copied into it before returning it.
This method of exposing the bytes of a ByteString can save one array copy and allocation in the happy path scenario which can lead to better performance, however it also means that one MUST NOT modify the returned array, or unexpected immutable data structure contract-breaking behavior will manifest itself.
This API is intended for users who need to pass the byte array to some other API, which will only read the bytes and never mutate then. For all other intents and purposes, please use the usual toArray method - which provide the immutability guarantees by copying the backing array.
Attributes
- Definition Classes
Inherited methods
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- SeqOps -> IterableOps
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- PartialFunction -> Function1
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- IndexedSeq -> Seq -> Equals
- Inherited from:
- IndexedSeq
Attributes
- Definition Classes
- ByteString -> Iterable
- Inherited from:
- ByteString
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- SeqOps
Create a new ByteString with all contents compacted into a single, full byte array. If isCompact returns true, compact is an O(1) operation, but might return a different object with an optimized implementation.
Create a new ByteString with all contents compacted into a single, full byte array. If isCompact returns true, compact is an O(1) operation, but might return a different object with an optimized implementation.
Attributes
- Inherited from:
- CompactByteString
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- Function1
Java API: efficiently concatenate another ByteString.
Attributes
- Definition Classes
- SeqOps -> IterableOps
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- ByteString -> IterableOnceOps
- Inherited from:
- ByteString
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Inherited from:
- SeqOps
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
x
of typeAny
,x.equals(x)
should returntrue
. - It is symmetric: for any instances
x
andy
of typeAny
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any instances
x
,y
, andz
of typeAny
ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
.
If you override this method, you should verify that your implementation remains an equivalence relation.
Additionally, when overriding this method it is usually necessary to override hashCode
to ensure that
objects which are "equal" (o1.equals(o2)
returns true
) hash to the same scala.Int.
(o1.hashCode.equals(o2.hashCode)
).
Attributes
- that
the object to compare against this object for equality.
- Returns:
true
if the receiver object is equivalent to the argument;false
otherwise.- Definition Classes
- Seq -> Equals -> Any
- Inherited from:
- Seq
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
- IndexedSeqOps -> IterableOnceOps
- Inherited from:
- IndexedSeqOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
- ByteString -> IterableOnceOps
- Inherited from:
- ByteString
Java API: Returns an Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments. Will always have at least one entry.
Java API: Returns an Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments. Will always have at least one entry.
Attributes
- Inherited from:
- ByteString
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- ByteString -> IterableOps
- Inherited from:
- ByteString
Calculate a hash code value for the object.
Calculate a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)
) yet
not be equal (o1.equals(o2)
returns false
). A degenerate implementation could always return 0
.
However, it is required that if two objects are equal (o1.equals(o2)
returns true
) that they have
identical hash codes (o1.hashCode.equals(o2.hashCode)
). Therefore, when overriding this method, be sure
to verify that the behavior is consistent with the equals
method.
Attributes
- Returns:
the hash code value for this object.
- Definition Classes
- Seq -> Any
- Inherited from:
- Seq
Attributes
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Definition Classes
- IndexedSeqOps -> IterableOps
- Inherited from:
- IndexedSeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- ByteString -> SeqOps
- Inherited from:
- ByteString
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- ByteString -> IterableOps
- Inherited from:
- ByteString
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Check whether this ByteString is compact in memory. If the ByteString is compact, it might, however, not be represented by an object that takes full advantage of that fact. Use compact to get such an object.
Check whether this ByteString is compact in memory. If the ByteString is compact, it might, however, not be represented by an object that takes full advantage of that fact. Use compact to get such an object.
Attributes
- Inherited from:
- CompactByteString
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Definition Classes
- IterableOps -> IterableOnceOps
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- IndexedSeq -> IndexedSeq -> Seq -> Seq -> Iterable -> Iterable -> IterableOps
- Inherited from:
- IndexedSeq
Attributes
- Definition Classes
- IndexedSeqOps -> IterableOnce
- Inherited from:
- IndexedSeqOps
Attributes
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- Iterable
Attributes
- Definition Classes
- IndexedSeqOps -> SeqOps
- Inherited from:
- IndexedSeqOps
Attributes
- Definition Classes
- IndexedSeqOps -> SeqOps
- Inherited from:
- IndexedSeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- ByteString
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from:
- StrictOptimizedIterableOps
map method that will automatically cast Int back into Byte.
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
- IndexedSeqOps -> SeqOps
- Inherited from:
- IndexedSeqOps
Attributes
- Definition Classes
- IndexedSeqOps -> SeqOps
- Inherited from:
- IndexedSeqOps
Attributes
- Definition Classes
- IndexedSeqOps -> IterableOnceOps
- Inherited from:
- IndexedSeqOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- IndexedSeq -> SeqOps
- Inherited from:
- IndexedSeq
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IndexedSeq
Attributes
- Inherited from:
- IndexedSeq
Attributes
- Inherited from:
- IndexedSeqOps
Attributes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- IndexedSeqOps -> SeqOps
- Inherited from:
- IndexedSeqOps
Attributes
- Definition Classes
- IndexedSeqOps -> SeqOps
- Inherited from:
- IndexedSeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- SeqOps -> IterableOnceOps
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- SeqOps -> IterableOps
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- SeqOps -> IterableOps
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- IndexedSeqOps -> IterableOnce
- Inherited from:
- IndexedSeqOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
- ByteString -> IterableOps
- Inherited from:
- ByteString
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
- ByteString -> IterableOnceOps
- Inherited from:
- ByteString
Attributes
- Inherited from:
- IterableOnceOps
Creates a new ByteBuffer with a copy of all bytes contained in this ByteString.
Creates a new ByteBuffer with a copy of all bytes contained in this ByteString.
Attributes
- Inherited from:
- ByteString
Attributes
- Definition Classes
- IndexedSeq -> IterableOnceOps
- Inherited from:
- IndexedSeq
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
- Seq -> IterableOnceOps
- Inherited from:
- Seq
Attributes
- Inherited from:
- IterableOnceOps
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns:
a string representation of the object.
- Definition Classes
- Inherited from:
- ByteString
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- StrictOptimizedSeqOps -> SeqOps
- Inherited from:
- StrictOptimizedSeqOps
Decodes this ByteString as a UTF-8 encoded String.
Attributes
- Definition Classes
- IndexedSeqOps -> SeqOps -> IterableOps
- Inherited from:
- IndexedSeqOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from:
- StrictOptimizedIterableOps
Deprecated and Inherited methods
Attributes
- Deprecated
[Since version 2.13.0]
Use foldLeft instead of /:- Inherited from:
- IterableOnceOps
Attributes
- Deprecated
[Since version 2.13.0]
Use foldRight instead of :\\- Inherited from:
- IterableOnceOps
Attributes
- Deprecated
[Since version 2.13.0]
`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.- Inherited from:
- IterableOnceOps
Attributes
- Deprecated
[Since version 2.13.0]
Use iterableFactory instead- Inherited from:
- IterableOps
Attributes
- Deprecated
[Since version 2.13.0]
Use `dest ++= coll` instead- Inherited from:
- IterableOnceOps
Attributes
- Deprecated
[Since version 2.13.0]
Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)- Inherited from:
- IterableOnceOps
Attributes
- Deprecated
[Since version 2.13.0]
Use segmentLength instead of prefixLength- Inherited from:
- SeqOps
Attributes
- Deprecated
[Since version 2.13.0]
Use coll instead of repr in a collection implementation, use the collection value itself from the outside- Inherited from:
- IterableOps
Attributes
- Deprecated
[Since version 2.13.0]
Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)- Inherited from:
- SeqOps
Attributes
- Deprecated
[Since version 2.13.0]
Iterable.seq always returns the iterable itself- Inherited from:
- Iterable
Attributes
- Deprecated
[Since version 2.13.7]
toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections- Inherited from:
- Iterable
Attributes
- Deprecated
[Since version 2.13.0]
Use .iterator instead of .toIterator- Inherited from:
- IterableOnceOps
Attributes
- Deprecated
[Since version 2.13.0]
Use .to(LazyList) instead of .toStream- Inherited from:
- IterableOnceOps
Attributes
- Deprecated
[Since version 2.13.0]
toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections- Inherited from:
- IterableOps
Attributes
- Deprecated
[Since version 2.13.0]
Use `concat` instead- Inherited from:
- SeqOps
Attributes
- Deprecated
[Since version 2.13.0]
Use .view.slice(from, until) instead of .view(from, until)- Definition Classes
- IndexedSeqOps -> IterableOps
- Inherited from:
- IndexedSeqOps