public static final class ByteString.ByteString1 extends ByteString implements scala.Serializable
ByteString.ByteString1, ByteString.ByteString1$, ByteString.ByteString1C, ByteString.ByteString1C$, ByteString.ByteStrings, ByteString.ByteStrings$, ByteString.Companion, ByteString.Companion$
scala.collection.immutable.IndexedSeq.Impl<A>
scala.PartialFunction.AndThen<A,B,C>, scala.PartialFunction.Lifted<A,B>, scala.PartialFunction.OrElse<A,B>, scala.PartialFunction.Unlifted<A,B>
scala.collection.IndexedSeqLike.Elements
scala.collection.SeqLike.CombinationsItr, scala.collection.SeqLike.PermutationsItr
scala.collection.TraversableLike.WithFilter
scala.collection.TraversableOnce.BufferedCanBuildFrom<A,CC extends scala.collection.TraversableOnce<java.lang.Object>>, scala.collection.TraversableOnce.FlattenOps<A>, scala.collection.TraversableOnce.ForceImplicitAmbiguity, scala.collection.TraversableOnce.MonadOps<A>, scala.collection.TraversableOnce.OnceCanBuildFrom<A>
Modifier and Type | Method and Description |
---|---|
byte |
apply(int idx) |
java.nio.ByteBuffer |
asByteBuffer()
Returns a read-only ByteBuffer that directly wraps this ByteString
if it is not fragmented.
|
scala.collection.immutable.Iterable<java.nio.ByteBuffer> |
asByteBuffers()
Scala API: Returns an immutable Iterable of read-only ByteBuffers that directly wraps this ByteStrings
all fragments.
|
ByteString.ByteString1$ |
byteStringCompanion() |
CompactByteString |
compact()
Create a new ByteString with all contents compacted into a single,
full byte array.
|
int |
copyToBuffer(java.nio.ByteBuffer buffer)
Copy as many bytes as possible to a ByteBuffer, starting from it's
current position.
|
java.lang.String |
decodeString(java.nio.charset.Charset charset)
Decodes this ByteString using a charset to produce a String.
|
java.lang.String |
decodeString(java.lang.String charset)
Decodes this ByteString using a charset to produce a String.
|
ByteString |
drop(int n) |
ByteString.ByteString1 |
drop1(int n)
INTERNAL API
|
ByteString |
dropRight(int n) |
ByteString.ByteString1 |
dropRight1(int n)
INTERNAL API
|
<B> int |
indexOf(B elem) |
<B> int |
indexOf(B elem,
int from) |
boolean |
isCompact()
Check whether this ByteString is compact in memory.
|
ByteIterator.ByteArrayIterator |
iterator() |
int |
length() |
ByteString |
slice(int from,
int until) |
ByteString |
take(int n) |
ByteString.ByteString1 |
take1(int n) |
protected java.lang.Object |
writeReplace() |
int |
writeToBuffer(java.nio.ByteBuffer buffer)
INTERNAL API: Specialized for internal use, writing multiple ByteString1C into the same ByteBuffer.
|
void |
writeToOutputStream(java.io.ObjectOutputStream os) |
$colon$bslash, $colon$plus, $div$colon, $plus$colon, $plus$plus, $plus$plus$colon, $plus$plus$colon, addString, addString, addString, aggregate, andThen, apply$mcDD$sp, apply$mcDF$sp, apply$mcDI$sp, apply$mcDJ$sp, apply$mcFD$sp, apply$mcFF$sp, apply$mcFI$sp, apply$mcFJ$sp, apply$mcID$sp, apply$mcIF$sp, apply$mcII$sp, apply$mcIJ$sp, apply$mcJD$sp, apply$mcJF$sp, apply$mcJI$sp, apply$mcJJ$sp, apply$mcVD$sp, apply$mcVF$sp, apply$mcVI$sp, apply$mcVJ$sp, apply$mcZD$sp, apply$mcZF$sp, apply$mcZI$sp, apply$mcZJ$sp, applyOrElse, canBuildFrom, canEqual, collect, collectFirst, combinations, companion, compose, concat, contains, containsSlice, copyToArray, corresponds, count, createBuilder, diff, distinct, dropWhile, empty, endsWith, equals, exists, filter, filterImpl, filterNot, find, flatMap, flatten, fold, foldLeft, foldRight, forall, foreach, fromArray, fromArray, fromByteBuffer, fromInts, fromInts, fromString, fromString, genericBuilder, getByteBuffers, groupBy, grouped, hasDefiniteSize, hashCode, head, headOption, indexOfSlice, indexOfSlice, indexWhere, indices, init, inits, intersect, isDefinedAt, isEmpty, isTraversableAgain, last, lastIndexOf, lastIndexOf, lastIndexOfSlice, lastIndexOfSlice, lastIndexWhere, lastIndexWhere, lastOption, lengthCompare, lift, map, mapI, max, maxBy, min, minBy, mkString, mkString, mkString, newBuilder, nonEmpty, orElse, padTo, par, parCombiner, partition, patch, permutations, prefixLength, product, reduce, reduceLeft, reduceLeftOption, reduceOption, reduceRight, reduceRightOption, repr, reverse, reversed, reverseIterator, reverseMap, runWith, sameElements, scan, scanLeft, scanRight, segmentLength, seq, size, sizeHintIfCheap, sliceWithKnownBound, sliceWithKnownDelta, sliding, sliding, sortBy, sorted, sortWith, span, splitAt, startsWith, startsWith, stringPrefix, sum, tail, tails, takeRight, takeWhile, thisCollection, to, toArray, toArray, toBuffer, toByteBuffer, toCollection, toIndexedSeq, toIterable, toIterator, toList, toMap, toSeq, toSet, toStream, toString, toTraversable, toVector, transpose, union, unzip, unzip3, updated, UTF_8, utf8String, view, view, withFilter, zip, zipAll, zipWithIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
$init$, companion, concat, fill, fill, fill, fill, fill, iterate, range, range, ReusableCBF, seq, tabulate, tabulate, tabulate, tabulate, tabulate, toIndexedSeq, unapplySeq
$init$, andThen, applyOrElse, cond, condOpt, isDefinedAt, lift, orElse, runWith
$init$, apply, apply$mcDD$sp, apply$mcDF$sp, apply$mcDI$sp, apply$mcDJ$sp, apply$mcFD$sp, apply$mcFF$sp, apply$mcFI$sp, apply$mcFJ$sp, apply$mcID$sp, apply$mcIF$sp, apply$mcII$sp, apply$mcIJ$sp, apply$mcJD$sp, apply$mcJF$sp, apply$mcJI$sp, apply$mcJJ$sp, apply$mcVD$sp, apply$mcVF$sp, apply$mcVI$sp, apply$mcVJ$sp, apply$mcZD$sp, apply$mcZF$sp, apply$mcZI$sp, apply$mcZJ$sp, compose
$init$, apply, concat, fill, fill, fill, fill, fill, iterate, range, range, tabulate, tabulate, tabulate, tabulate, tabulate
$init$, flatten, genericBuilder, isEmpty, transpose, unzip, unzip3
$init$, hashCode, sizeHintIfCheap, thisCollection, toBuffer, toCollection
$colon$plus, $init$, $plus$colon, combinations, contains, containsSlice, corresponds, diff, distinct, endsWith, indexOfSlice, indexOfSlice, indexWhere, indices, intersect, isEmpty, lastIndexOfSlice, lastIndexOfSlice, lastIndexWhere, lengthCompare, padTo, patch, permutations, reverse, reverseIterator, reverseMap, segmentLength, size, sortBy, sorted, sortWith, startsWith, union, updated, view, view
$init$, canEqual, exists, find, foldRight, forall, grouped, reduceRight, sameElements, sliding, sliding, toIterable, toIterator, toStream, zip, zipAll, zipWithIndex
$init$, $plus$plus, $plus$plus$colon, $plus$plus$colon, collect, filter, filterImpl, filterNot, flatMap, groupBy, hasDefiniteSize, headOption, inits, isTraversableAgain, lastOption, map, partition, repr, scan, scanLeft, scanRight, sliceWithKnownBound, sliceWithKnownDelta, tails, to, toTraversable, withFilter
$colon$bslash, $div$colon, $init$, addString, addString, addString, aggregate, alternateImplicit, collectFirst, copyToArray, copyToArray, copyToBuffer, count, flattenTraversableOnce, fold, foldLeft, max, maxBy, min, minBy, mkString, mkString, mkString, MonadOps, nonEmpty, OnceCanBuildFrom, product, reduce, reduceLeft, reduceLeftOption, reduceOption, reduceRightOption, reversed, sum, toList, toMap, toSet, toVector
public int length()
length
in interface scala.collection.GenSeqLike<java.lang.Object,ByteString>
length
in interface scala.collection.SeqLike<java.lang.Object,ByteString>
length
in class ByteString
public byte apply(int idx)
apply
in interface scala.collection.GenSeqLike<java.lang.Object,ByteString>
apply
in interface scala.collection.SeqLike<java.lang.Object,ByteString>
apply
in class ByteString
public ByteIterator.ByteArrayIterator iterator()
iterator
in interface scala.collection.GenIterableLike<java.lang.Object,ByteString>
iterator
in interface scala.collection.IndexedSeqLike<java.lang.Object,ByteString>
iterator
in interface scala.collection.IterableLike<java.lang.Object,ByteString>
iterator
in class ByteString
public void writeToOutputStream(java.io.ObjectOutputStream os)
writeToOutputStream
in class ByteString
public boolean isCompact()
ByteString
isCompact
in class ByteString
public ByteString.ByteString1$ byteStringCompanion()
byteStringCompanion
in class ByteString
public ByteString dropRight(int n)
dropRight
in interface scala.collection.IndexedSeqOptimized<java.lang.Object,ByteString>
dropRight
in interface scala.collection.IterableLike<java.lang.Object,ByteString>
dropRight
in class ByteString
public ByteString.ByteString1 dropRight1(int n)
public ByteString drop(int n)
drop
in interface scala.collection.GenTraversableLike<java.lang.Object,ByteString>
drop
in interface scala.collection.IndexedSeqOptimized<java.lang.Object,ByteString>
drop
in interface scala.collection.IterableLike<java.lang.Object,ByteString>
drop
in interface scala.collection.TraversableLike<java.lang.Object,ByteString>
drop
in class ByteString
public ByteString.ByteString1 drop1(int n)
public ByteString take(int n)
take
in interface scala.collection.GenTraversableLike<java.lang.Object,ByteString>
take
in interface scala.collection.IndexedSeqOptimized<java.lang.Object,ByteString>
take
in interface scala.collection.IterableLike<java.lang.Object,ByteString>
take
in interface scala.collection.TraversableLike<java.lang.Object,ByteString>
take
in class ByteString
public ByteString.ByteString1 take1(int n)
public ByteString slice(int from, int until)
slice
in interface scala.collection.GenTraversableLike<java.lang.Object,ByteString>
slice
in interface scala.collection.IndexedSeqOptimized<java.lang.Object,ByteString>
slice
in interface scala.collection.IterableLike<java.lang.Object,ByteString>
slice
in interface scala.collection.TraversableLike<java.lang.Object,ByteString>
slice
in class ByteString
public int copyToBuffer(java.nio.ByteBuffer buffer)
ByteString
copyToBuffer
in class ByteString
buffer
- a ByteBuffer to copy bytes topublic int writeToBuffer(java.nio.ByteBuffer buffer)
public CompactByteString compact()
ByteString
compact
in class ByteString
public java.nio.ByteBuffer asByteBuffer()
ByteString
asByteBuffer
in class ByteString
public scala.collection.immutable.Iterable<java.nio.ByteBuffer> asByteBuffers()
ByteString
asByteBuffers
in class ByteString
public java.lang.String decodeString(java.lang.String charset)
ByteString
Charset
instance available, use decodeString(charset: java.nio.charset.Charset
instead.decodeString
in class ByteString
charset
- (undocumented)public java.lang.String decodeString(java.nio.charset.Charset charset)
ByteString
decodeString(charset: String)
.decodeString
in class ByteString
charset
- (undocumented)public <B> int indexOf(B elem)
indexOf
in interface scala.collection.GenSeqLike<java.lang.Object,ByteString>
indexOf
in class ByteString
public <B> int indexOf(B elem, int from)
indexOf
in interface scala.collection.GenSeqLike<java.lang.Object,ByteString>
protected java.lang.Object writeReplace()