Efficiently concatenate another ByteString.
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.
Scala API: Returns an immutable Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments.
Scala API: Returns an immutable Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments. Will always have at least one entry.
Decodes this ByteString using a charset to produce a 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)
.
Decodes this ByteString using a charset to produce a String.
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.
Create a new ByteString with all contents compacted into a single, full byte array.
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.
Java API: efficiently concatenate another ByteString.
Java API: efficiently concatenate another ByteString.
Copy as many bytes as possible to a ByteBuffer, starting from it's current position.
Copy as many bytes as possible to a ByteBuffer, starting from it's current position. This method will not overflow the buffer.
a ByteBuffer to copy bytes to
the number of bytes actually copied
Java API: Returns an Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments.
Java API: Returns an Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments. Will always have at least one entry.
Check whether this ByteString is compact in memory.
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.
map method that will automatically cast Int back into Byte.
map method that will automatically cast Int back into Byte.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Java API: copy this ByteString into a fresh byte array
Java API: copy this ByteString into a fresh byte array
this ByteString copied into a byte array
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.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Decodes this ByteString as a UTF-8 encoded String.
Decodes this ByteString as a UTF-8 encoded String.
(compactByteString: MonadOps[Byte]).filter(p)
(compactByteString: MonadOps[Byte]).flatMap(f)
(compactByteString: MonadOps[Byte]).map(f)
(compactByteString: MonadOps[Byte]).withFilter(p)
A compact ByteString.
The ByteString is guarantied to be contiguous in memory and to use only as much memory as required for its contents.