Package akka.util

Class ByteString

  • All Implemented Interfaces:
    scala.collection.generic.FilterMonadic<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>, scala.collection.generic.GenericTraversableTemplate<java.lang.Object,​scala.collection.GenTraversable>, scala.collection.generic.HasNewBuilder<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>, scala.collection.GenIterable<java.lang.Object>, scala.collection.GenIterableLike<java.lang.Object,​scala.collection.GenIterable<java.lang.Object>>, scala.collection.GenSeq<java.lang.Object>, scala.collection.GenSeqLike<java.lang.Object,​scala.collection.GenSeq<java.lang.Object>>, scala.collection.GenTraversable<java.lang.Object>, scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>, scala.collection.GenTraversableOnce<java.lang.Object>, scala.collection.immutable.IndexedSeq<java.lang.Object>, scala.collection.immutable.Iterable<java.lang.Object>, scala.collection.immutable.Seq<java.lang.Object>, scala.collection.immutable.Traversable<java.lang.Object>, scala.collection.IndexedSeq<java.lang.Object>, scala.collection.IndexedSeqLike<java.lang.Object,​scala.collection.IndexedSeq<java.lang.Object>>, scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>, scala.collection.Iterable<java.lang.Object>, scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>, scala.collection.Parallelizable<java.lang.Object,​scala.collection.parallel.ParIterable<java.lang.Object>>, scala.collection.Seq<java.lang.Object>, scala.collection.SeqLike<java.lang.Object,​scala.collection.Seq<java.lang.Object>>, scala.collection.Traversable<java.lang.Object>, scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>, scala.collection.TraversableOnce<java.lang.Object>, scala.Equals, scala.Function1<java.lang.Object,​java.lang.Object>, scala.Immutable, scala.PartialFunction<java.lang.Object,​java.lang.Object>
    Direct Known Subclasses:
    ByteString.ByteString1, ByteString.ByteStrings, CompactByteString

    public abstract class ByteString
    extends java.lang.Object
    implements scala.collection.immutable.IndexedSeq<java.lang.Object>, scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
    A rope-like immutable data structure containing bytes. The goal of this structure is to reduce copying of arrays when concatenating and slicing sequences of bytes, and also providing a thread safe way of working with bytes.

    TODO: Add performance characteristics

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ByteString.ByteString1
      An unfragmented ByteString.
      static class  ByteString.ByteString1$
      INTERNAL API: ByteString backed by exactly one array, with start / end markers
      static class  ByteString.ByteString1C
      A compact (unsliced) and unfragmented ByteString, implementation of ByteString1C.
      static class  ByteString.ByteString1C$  
      static class  ByteString.ByteStrings
      A ByteString with 2 or more fragments.
      static class  ByteString.ByteStrings$  
      static interface  ByteString.Companion  
      static class  ByteString.Companion$  
      • Nested classes/interfaces inherited from interface scala.collection.immutable.IndexedSeq

        scala.collection.immutable.IndexedSeq.Impl<A extends java.lang.Object>
      • Nested classes/interfaces inherited from interface scala.collection.IndexedSeqLike

        scala.collection.IndexedSeqLike.Elements
      • Nested classes/interfaces inherited from interface scala.PartialFunction

        scala.PartialFunction.AndThen<A extends java.lang.Object,​B extends java.lang.Object,​C extends java.lang.Object>, scala.PartialFunction.Lifted<A extends java.lang.Object,​B extends java.lang.Object>, scala.PartialFunction.OrElse<A extends java.lang.Object,​B extends java.lang.Object>, scala.PartialFunction.Unlifted<A extends java.lang.Object,​B extends java.lang.Object>
      • Nested classes/interfaces inherited from interface scala.collection.SeqLike

        scala.collection.SeqLike.CombinationsItr, scala.collection.SeqLike.PermutationsItr
      • Nested classes/interfaces inherited from interface scala.collection.TraversableLike

        scala.collection.TraversableLike.WithFilter
      • Nested classes/interfaces inherited from interface scala.collection.TraversableOnce

        scala.collection.TraversableOnce.BufferedCanBuildFrom<A extends java.lang.Object,​CC extends scala.collection.TraversableOnce<java.lang.Object>>, scala.collection.TraversableOnce.FlattenOps<A extends java.lang.Object>, scala.collection.TraversableOnce.ForceImplicitAmbiguity, scala.collection.TraversableOnce.MonadOps<A extends java.lang.Object>, scala.collection.TraversableOnce.OnceCanBuildFrom<A extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteString()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static <B> B $colon$bslash​(B z, scala.Function2<A,​B,​B> op)  
      static <B,​That>
      That
      $colon$plus​(B elem, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static <B> B $div$colon​(B z, scala.Function2<B,​A,​B> op)  
      static <B,​That>
      That
      $plus$colon​(B elem, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      abstract ByteString $plus$plus​(ByteString that)
      Efficiently concatenate another ByteString.
      static <B,​That>
      That
      $plus$plus$colon​(scala.collection.Traversable<B> that, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static <B,​That>
      That
      $plus$plus$colon​(scala.collection.TraversableOnce<B> that, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static scala.collection.mutable.StringBuilder addString​(scala.collection.mutable.StringBuilder b)  
      static scala.collection.mutable.StringBuilder addString​(scala.collection.mutable.StringBuilder b, java.lang.String sep)  
      static scala.collection.mutable.StringBuilder addString​(scala.collection.mutable.StringBuilder b, java.lang.String start, java.lang.String sep, java.lang.String end)  
      static <B> B aggregate​(scala.Function0<B> z, scala.Function2<B,​A,​B> seqop, scala.Function2<B,​B,​B> combop)  
      static <C> scala.PartialFunction<A,​C> andThen​(scala.Function1<B,​C> k)  
      abstract byte apply​(int idx)  
      static double apply$mcDD$sp​(double v1)  
      static double apply$mcDF$sp​(float v1)  
      static double apply$mcDI$sp​(int v1)  
      static double apply$mcDJ$sp​(long v1)  
      static float apply$mcFD$sp​(double v1)  
      static float apply$mcFF$sp​(float v1)  
      static float apply$mcFI$sp​(int v1)  
      static float apply$mcFJ$sp​(long v1)  
      static int apply$mcID$sp​(double v1)  
      static int apply$mcIF$sp​(float v1)  
      static int apply$mcII$sp​(int v1)  
      static int apply$mcIJ$sp​(long v1)  
      static long apply$mcJD$sp​(double v1)  
      static long apply$mcJF$sp​(float v1)  
      static long apply$mcJI$sp​(int v1)  
      static long apply$mcJJ$sp​(long v1)  
      static void apply$mcVD$sp​(double v1)  
      static void apply$mcVF$sp​(float v1)  
      static void apply$mcVI$sp​(int v1)  
      static void apply$mcVJ$sp​(long v1)  
      static boolean apply$mcZD$sp​(double v1)  
      static boolean apply$mcZF$sp​(float v1)  
      static boolean apply$mcZI$sp​(int v1)  
      static boolean apply$mcZJ$sp​(long v1)  
      static <A1 extends A,​B1>
      B1
      applyOrElse​(A1 x, scala.Function1<A1,​B1> default_)  
      abstract java.nio.ByteBuffer asByteBuffer()
      Returns a read-only ByteBuffer that directly wraps this ByteString if it is not fragmented.
      abstract 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.
      abstract ByteString.Companion byteStringCompanion()  
      static scala.collection.generic.CanBuildFrom<scala.collection.TraversableOnce<java.lang.Object>,​java.lang.Object,​ByteString> canBuildFrom()  
      static boolean canEqual​(java.lang.Object that)  
      static <B,​That>
      That
      collect​(scala.PartialFunction<A,​B> pf, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static <B> scala.Option<B> collectFirst​(scala.PartialFunction<A,​B> pf)  
      static scala.collection.Iterator<Repr> combinations​(int n)  
      abstract CompactByteString compact()
      Create a new ByteString with all contents compacted into a single, full byte array.
      static scala.collection.generic.GenericCompanion<scala.collection.immutable.IndexedSeq> companion()  
      static <A> scala.Function1<A,​R> compose​(scala.Function1<A,​T1> g)  
      ByteString concat​(ByteString that)
      Java API: efficiently concatenate another ByteString.
      static <A1> boolean contains​(A1 elem)  
      static <B> boolean containsSlice​(scala.collection.GenSeq<B> that)  
      <B> void copyToArray​(java.lang.Object xs, int start, int len)  
      int copyToBuffer​(java.nio.ByteBuffer buffer)
      Copy as many bytes as possible to a ByteBuffer, starting from it's current position.
      static <B> boolean corresponds​(scala.collection.GenSeq<B> that, scala.Function2<A,​B,​java.lang.Object> p)  
      static int count​(scala.Function1<A,​java.lang.Object> p)  
      static ByteStringBuilder createBuilder()
      Java API
      abstract java.lang.String decodeString​(java.lang.String charset)
      Decodes this ByteString using a charset to produce a String.
      abstract java.lang.String decodeString​(java.nio.charset.Charset charset)
      Decodes this ByteString using a charset to produce a String.
      static <B> Repr diff​(scala.collection.GenSeq<B> that)  
      static Repr distinct()  
      ByteString drop​(int n)  
      ByteString dropRight​(int n)  
      ByteString dropWhile​(scala.Function1<java.lang.Object,​java.lang.Object> p)  
      static ByteString empty()  
      static <B> boolean endsWith​(scala.collection.GenSeq<B> that)  
      static boolean equals​(java.lang.Object that)  
      static boolean exists​(scala.Function1<A,​java.lang.Object> p)  
      static Repr filter​(scala.Function1<A,​java.lang.Object> p)  
      static Repr filterImpl​(scala.Function1<A,​java.lang.Object> p, boolean isFlipped)  
      static Repr filterNot​(scala.Function1<A,​java.lang.Object> p)  
      static scala.Option<A> find​(scala.Function1<A,​java.lang.Object> p)  
      static <B,​That>
      That
      flatMap​(scala.Function1<A,​scala.collection.GenTraversableOnce<B>> f, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static <B> CC flatten​(scala.Function1<A,​scala.collection.GenTraversableOnce<B>> asTraversable)  
      static <A1> A1 fold​(A1 z, scala.Function2<A1,​A1,​A1> op)  
      static <B> B foldLeft​(B z, scala.Function2<B,​A,​B> op)  
      static <B> B foldRight​(B z, scala.Function2<A,​B,​B> op)  
      static boolean forall​(scala.Function1<A,​java.lang.Object> p)  
      <U> void foreach​(scala.Function1<java.lang.Object,​U> f)  
      void foreach$mBc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)  
      void foreach$mCc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)  
      void foreach$mDc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)  
      void foreach$mFc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)  
      void foreach$mIc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)  
      void foreach$mJc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)  
      void foreach$mSc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)  
      void foreach$mVc$sp​(scala.Function1<java.lang.Object,​scala.runtime.BoxedUnit> f)  
      void foreach$mZc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)  
      static ByteString fromArray​(byte[] array)
      Creates a new ByteString by copying a byte array.
      static ByteString fromArray​(byte[] array, int offset, int length)
      Creates a new ByteString by copying length bytes starting at offset from an Array.
      static ByteString fromArrayUnsafe​(byte[] array)
      Unsafe API: Use only in situations you are completely confident that this is what you need, and that you understand the implications documented below.
      static ByteString fromArrayUnsafe​(byte[] array, int offset, int length)
      Unsafe API: Use only in situations you are completely confident that this is what you need, and that you understand the implications documented below.
      static ByteString fromByteBuffer​(java.nio.ByteBuffer buffer)
      Creates a new ByteString by copying bytes out of a ByteBuffer.
      static ByteString fromInts​(int... array)
      JAVA API Creates a new ByteString by copying an int array by converting from integral numbers to bytes.
      static ByteString fromInts​(scala.collection.Seq<java.lang.Object> array)
      JAVA API Creates a new ByteString by copying an int array by converting from integral numbers to bytes.
      static ByteString fromString​(java.lang.String string)
      Creates a new ByteString which will contain the UTF-8 representation of the given String
      static ByteString fromString​(java.lang.String string, java.lang.String charset)
      Creates a new ByteString which will contain the representation of the given String in the given charset
      static ByteString fromString​(java.lang.String string, java.nio.charset.Charset charset)
      Creates a new ByteString which will contain the representation of the given String in the given charset
      static <B> scala.collection.mutable.Builder<B,​CC> genericBuilder()  
      java.lang.Iterable<java.nio.ByteBuffer> getByteBuffers()
      Java API: Returns an Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments.
      static <K> scala.collection.immutable.Map<K,​Repr> groupBy​(scala.Function1<A,​K> f)  
      scala.collection.Iterator<ByteString> grouped​(int size)  
      static boolean hasDefiniteSize()  
      static int hashCode()  
      byte head()  
      static scala.Option<A> headOption()  
      <B> int indexOf​(B elem)  
      static <B> int indexOfSlice​(scala.collection.GenSeq<B> that)  
      static <B> int indexOfSlice​(scala.collection.GenSeq<B> that, int from)  
      int indexWhere​(scala.Function1<java.lang.Object,​java.lang.Object> p)  
      static scala.collection.immutable.Range indices()  
      ByteString init()  
      static scala.collection.Iterator<Repr> inits()  
      static <B> Repr intersect​(scala.collection.GenSeq<B> that)  
      abstract boolean isCompact()
      Check whether this ByteString is compact in memory.
      abstract static boolean isDefinedAt​(A x)  
      abstract static boolean isEmpty()  
      static boolean isTraversableAgain()  
      ByteIterator iterator()  
      byte last()  
      static <B> int lastIndexOf​(B elem)  
      static <B> int lastIndexOf​(B elem, int end)  
      static <B> int lastIndexOfSlice​(scala.collection.GenSeq<B> that)  
      static <B> int lastIndexOfSlice​(scala.collection.GenSeq<B> that, int end)  
      static int lastIndexWhere​(scala.Function1<A,​java.lang.Object> p)  
      static int lastIndexWhere​(scala.Function1<A,​java.lang.Object> p, int end)  
      static scala.Option<A> lastOption()  
      abstract static int length()  
      static int lengthCompare​(int len)  
      static scala.Function1<A,​scala.Option<B>> lift()  
      static <B,​That>
      That
      map​(scala.Function1<A,​B> f, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      ByteString mapI​(scala.Function1<java.lang.Object,​java.lang.Object> f)
      map method that will automatically cast Int back into Byte.
      static <B> A max​(scala.math.Ordering<B> cmp)  
      static <B> A maxBy​(scala.Function1<A,​B> f, scala.math.Ordering<B> cmp)  
      static <B> A min​(scala.math.Ordering<B> cmp)  
      static <B> A minBy​(scala.Function1<A,​B> f, scala.math.Ordering<B> cmp)  
      static java.lang.String mkString()  
      static java.lang.String mkString​(java.lang.String sep)  
      static java.lang.String mkString​(java.lang.String start, java.lang.String sep, java.lang.String end)  
      protected ByteStringBuilder newBuilder()  
      static boolean nonEmpty()  
      static <A1 extends A,​B1>
      scala.PartialFunction<A1,​B1>
      orElse​(scala.PartialFunction<A1,​B1> that)  
      static <B,​That>
      That
      padTo​(int len, B elem, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static ParRepr par()  
      protected static scala.collection.parallel.Combiner<A,​scala.collection.parallel.immutable.ParSeq<A>> parCombiner()  
      static scala.Tuple2<Repr,​Repr> partition​(scala.Function1<A,​java.lang.Object> p)  
      static <B,​That>
      That
      patch​(int from, scala.collection.GenSeq<B> patch, int replaced, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static scala.collection.Iterator<Repr> permutations()  
      static int prefixLength​(scala.Function1<A,​java.lang.Object> p)  
      static <B> B product​(scala.math.Numeric<B> num)  
      static <A1> A1 reduce​(scala.Function2<A1,​A1,​A1> op)  
      static <B> B reduceLeft​(scala.Function2<B,​A,​B> op)  
      static <B> scala.Option<B> reduceLeftOption​(scala.Function2<B,​A,​B> op)  
      static <A1> scala.Option<A1> reduceOption​(scala.Function2<A1,​A1,​A1> op)  
      static <B> B reduceRight​(scala.Function2<A,​B,​B> op)  
      static <B> scala.Option<B> reduceRightOption​(scala.Function2<A,​B,​B> op)  
      static Repr repr()  
      static Repr reverse()  
      protected static scala.collection.immutable.List<A> reversed()  
      static scala.collection.Iterator<A> reverseIterator()  
      static <B,​That>
      That
      reverseMap​(scala.Function1<A,​B> f, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static <U> scala.Function1<A,​java.lang.Object> runWith​(scala.Function1<B,​U> action)  
      static <B> boolean sameElements​(scala.collection.GenIterable<B> that)  
      static <B,​That>
      That
      scan​(B z, scala.Function2<B,​B,​B> op, scala.collection.generic.CanBuildFrom<Repr,​B,​That> cbf)  
      static <B,​That>
      That
      scanLeft​(B z, scala.Function2<B,​A,​B> op, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static <B,​That>
      That
      scanRight​(B z, scala.Function2<A,​B,​B> op, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static int segmentLength​(scala.Function1<A,​java.lang.Object> p, int from)  
      static scala.collection.immutable.IndexedSeq<A> seq()  
      static int size()  
      protected static int sizeHintIfCheap()  
      ByteString slice​(int from, int until)  
      static Repr sliceWithKnownBound​(int from, int until)  
      static Repr sliceWithKnownDelta​(int from, int until, int delta)  
      static scala.collection.Iterator<Repr> sliding​(int size)  
      static scala.collection.Iterator<Repr> sliding​(int size, int step)  
      static <B> Repr sortBy​(scala.Function1<A,​B> f, scala.math.Ordering<B> ord)  
      static <B> Repr sorted​(scala.math.Ordering<B> ord)  
      static Repr sortWith​(scala.Function2<A,​A,​java.lang.Object> lt)  
      scala.Tuple2<ByteString,​ByteString> span​(scala.Function1<java.lang.Object,​java.lang.Object> p)  
      scala.Tuple2<ByteString,​ByteString> splitAt​(int n)  
      static <B> boolean startsWith​(scala.collection.GenSeq<B> that)  
      static <B> boolean startsWith​(scala.collection.GenSeq<B> that, int offset)  
      java.lang.String stringPrefix()  
      static <B> B sum​(scala.math.Numeric<B> num)  
      ByteString tail()  
      static scala.collection.Iterator<Repr> tails()  
      ByteString take​(int n)  
      ByteString takeRight​(int n)  
      ByteString takeWhile​(scala.Function1<java.lang.Object,​java.lang.Object> p)  
      protected static scala.collection.IndexedSeq<A> thisCollection()  
      static <Col> Col to​(scala.collection.generic.CanBuildFrom<scala.runtime.Nothing$,​A,​Col> cbf)  
      protected byte[] toArray()
      Java API: copy this ByteString into a fresh byte array
      <B> java.lang.Object toArray​(scala.reflect.ClassTag<B> arg0)  
      static <A1> scala.collection.mutable.Buffer<A1> toBuffer()  
      java.nio.ByteBuffer toByteBuffer()
      Creates a new ByteBuffer with a copy of all bytes contained in this ByteString.
      protected static scala.collection.IndexedSeq<A> toCollection​(Repr repr)  
      static scala.collection.immutable.IndexedSeq<A> toIndexedSeq()  
      static scala.collection.Iterable<A> toIterable()  
      static scala.collection.Iterator<A> toIterator()  
      static scala.collection.immutable.List<A> toList()  
      static <T,​U>
      scala.collection.immutable.Map<T,​U>
      toMap​(scala.Predef.$less$colon$less<A,​scala.Tuple2<T,​U>> ev)  
      static scala.collection.immutable.Seq<A> toSeq()  
      static <B> scala.collection.immutable.Set<B> toSet()  
      static scala.collection.immutable.Stream<A> toStream()  
      java.lang.String toString()  
      static scala.collection.Traversable<A> toTraversable()  
      static scala.collection.immutable.Vector<A> toVector()  
      static <B> CC transpose​(scala.Function1<A,​scala.collection.GenTraversableOnce<B>> asTraversable)  
      static <B,​That>
      That
      union​(scala.collection.GenSeq<B> that, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static <A1,​A2>
      scala.Tuple2<CC,​CC>
      unzip​(scala.Function1<A,​scala.Tuple2<A1,​A2>> asPair)  
      static <A1,​A2,​A3>
      scala.Tuple3<CC,​CC,​CC>
      unzip3​(scala.Function1<A,​scala.Tuple3<A1,​A2,​A3>> asTriple)  
      static <B,​That>
      That
      updated​(int index, B elem, scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)  
      static java.lang.String UTF_8()
      Standard "UTF-8" charset
      java.lang.String utf8String()
      Decodes this ByteString as a UTF-8 encoded String.
      static java.lang.Object view()  
      static scala.collection.SeqView<A,​Repr> view​(int from, int until)  
      static scala.collection.generic.FilterMonadic<A,​Repr> withFilter​(scala.Function1<A,​java.lang.Object> p)  
      abstract void writeToOutputStream​(java.io.ObjectOutputStream os)  
      static <A1,​B,​That>
      That
      zip​(scala.collection.GenIterable<B> that, scala.collection.generic.CanBuildFrom<Repr,​scala.Tuple2<A1,​B>,​That> bf)  
      static <B,​A1,​That>
      That
      zipAll​(scala.collection.GenIterable<B> that, A1 thisElem, B thatElem, scala.collection.generic.CanBuildFrom<Repr,​scala.Tuple2<A1,​B>,​That> bf)  
      static <A1,​That>
      That
      zipWithIndex​(scala.collection.generic.CanBuildFrom<Repr,​scala.Tuple2<A1,​java.lang.Object>,​That> bf)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface scala.Function1

        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
      • Methods inherited from interface scala.collection.generic.GenericTraversableTemplate

        flatten, genericBuilder, isEmpty, transpose, unzip, unzip3
      • Methods inherited from interface scala.collection.GenSeqLike

        equals, indexOf, isDefinedAt, lastIndexOf, lastIndexOf, lastIndexWhere, prefixLength, startsWith
      • Methods inherited from interface scala.collection.GenTraversableLike

        flatMap, map, size
      • Methods inherited from interface scala.collection.immutable.IndexedSeq

        companion, seq, toIndexedSeq
      • Methods inherited from interface scala.collection.IndexedSeqLike

        hashCode, seq, sizeHintIfCheap, thisCollection, toBuffer, toCollection
      • Methods inherited from interface scala.collection.IndexedSeqOptimized

        endsWith, exists, find, foldLeft, foldRight, forall, indexWhere, isEmpty, lastIndexWhere, lengthCompare, reduceLeft, reduceRight, reverse, reverseIterator, sameElements, segmentLength, startsWith, toList, zip, zipWithIndex
      • Methods inherited from interface scala.collection.IterableLike

        canEqual, sliding, sliding, toIterable, toIterator, toStream, zipAll
      • Methods inherited from interface scala.collection.Parallelizable

        par
      • Methods inherited from interface scala.PartialFunction

        andThen, applyOrElse, isDefinedAt, lift, orElse, runWith
      • Methods inherited from interface scala.collection.immutable.Seq

        parCombiner, toSeq
      • Methods inherited from interface scala.collection.SeqLike

        $colon$plus, $plus$colon, combinations, contains, containsSlice, corresponds, diff, distinct, indexOfSlice, indexOfSlice, indices, intersect, lastIndexOfSlice, lastIndexOfSlice, length, padTo, parCombiner, patch, permutations, reverseMap, size, sortBy, sorted, sortWith, toSeq, union, updated, view, view
      • Methods inherited from interface scala.collection.TraversableLike

        $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
      • Methods inherited from interface scala.collection.TraversableOnce

        $colon$bslash, $div$colon, addString, addString, addString, aggregate, collectFirst, copyToArray, copyToArray, copyToBuffer, count, fold, max, maxBy, min, minBy, mkString, mkString, mkString, nonEmpty, product, reduce, reduceLeftOption, reduceOption, reduceRightOption, reversed, sum, toMap, toSet, toVector
    • Constructor Detail

      • ByteString

        public ByteString()
    • Method Detail

      • fromInts

        public static ByteString fromInts​(int... array)
        JAVA API Creates a new ByteString by copying an int array by converting from integral numbers to bytes.
        Parameters:
        array - (undocumented)
        Returns:
        (undocumented)
      • fromArray

        public static ByteString fromArray​(byte[] array)
        Creates a new ByteString by copying a byte array.
        Parameters:
        array - (undocumented)
        Returns:
        (undocumented)
      • fromArrayUnsafe

        public static ByteString fromArrayUnsafe​(byte[] array)
        Unsafe API: Use only in situations you are completely confident that this is what you need, and that you understand the implications documented below.

        Creates a ByteString without copying the passed in byte array, unlike other factory methods defined on ByteString. This method of creating a ByteString saves one array copy and allocation and therefore can lead to better performance, however it also means that one MUST NOT modify the passed in array, or unexpected immutable data structure contract-breaking behavior will manifest itself.

        This API is intended for users who have obtained an byte array from some other API, and want wrap it into an ByteArray, and from there on only use that reference (the ByteString) to operate on the wrapped data. For all other intents and purposes, please use the usual apply and create methods - which provide the immutability guarantees by copying the array.

        Parameters:
        array - (undocumented)
        Returns:
        (undocumented)
      • fromArray

        public static ByteString fromArray​(byte[] array,
                                           int offset,
                                           int length)
        Creates a new ByteString by copying length bytes starting at offset from an Array.
        Parameters:
        array - (undocumented)
        offset - (undocumented)
        length - (undocumented)
        Returns:
        (undocumented)
      • fromArrayUnsafe

        public static ByteString fromArrayUnsafe​(byte[] array,
                                                 int offset,
                                                 int length)
        Unsafe API: Use only in situations you are completely confident that this is what you need, and that you understand the implications documented below.

        Creates a ByteString without copying the passed in byte array, unlike other factory methods defined on ByteString. This method of creating a ByteString saves one array copy and allocation and therefore can lead to better performance, however it also means that one MUST NOT modify the passed in array, or unexpected immutable data structure contract-breaking behavior will manifest itself.

        This API is intended for users who have obtained an byte array from some other API, and want wrap it into an ByteArray, and from there on only use that reference (the ByteString) to operate on the wrapped data. For all other intents and purposes, please use the usual apply and create methods - which provide the immutability guarantees by copying the array.

        Parameters:
        array - (undocumented)
        offset - (undocumented)
        length - (undocumented)
        Returns:
        (undocumented)
      • fromInts

        public static ByteString fromInts​(scala.collection.Seq<java.lang.Object> array)
        JAVA API Creates a new ByteString by copying an int array by converting from integral numbers to bytes.
        Parameters:
        array - (undocumented)
        Returns:
        (undocumented)
      • fromString

        public static ByteString fromString​(java.lang.String string)
        Creates a new ByteString which will contain the UTF-8 representation of the given String
        Parameters:
        string - (undocumented)
        Returns:
        (undocumented)
      • fromString

        public static ByteString fromString​(java.lang.String string,
                                            java.lang.String charset)
        Creates a new ByteString which will contain the representation of the given String in the given charset
        Parameters:
        string - (undocumented)
        charset - (undocumented)
        Returns:
        (undocumented)
      • fromString

        public static ByteString fromString​(java.lang.String string,
                                            java.nio.charset.Charset charset)
        Creates a new ByteString which will contain the representation of the given String in the given charset
        Parameters:
        string - (undocumented)
        charset - (undocumented)
        Returns:
        (undocumented)
      • UTF_8

        public static java.lang.String UTF_8()
        Standard "UTF-8" charset
        Returns:
        (undocumented)
      • fromByteBuffer

        public static ByteString fromByteBuffer​(java.nio.ByteBuffer buffer)
        Creates a new ByteString by copying bytes out of a ByteBuffer.
        Parameters:
        buffer - (undocumented)
        Returns:
        (undocumented)
      • canBuildFrom

        public static scala.collection.generic.CanBuildFrom<scala.collection.TraversableOnce<java.lang.Object>,​java.lang.Object,​ByteString> canBuildFrom()
      • reversed

        protected static scala.collection.immutable.List<A> reversed()
      • nonEmpty

        public static boolean nonEmpty()
      • count

        public static int count​(scala.Function1<A,​java.lang.Object> p)
      • collectFirst

        public static <B> scala.Option<B> collectFirst​(scala.PartialFunction<A,​B> pf)
      • $div$colon

        public static <B> B $div$colon​(B z,
                                       scala.Function2<B,​A,​B> op)
      • $colon$bslash

        public static <B> B $colon$bslash​(B z,
                                          scala.Function2<A,​B,​B> op)
      • reduceLeftOption

        public static <B> scala.Option<B> reduceLeftOption​(scala.Function2<B,​A,​B> op)
      • reduceRightOption

        public static <B> scala.Option<B> reduceRightOption​(scala.Function2<A,​B,​B> op)
      • reduce

        public static <A1> A1 reduce​(scala.Function2<A1,​A1,​A1> op)
      • reduceOption

        public static <A1> scala.Option<A1> reduceOption​(scala.Function2<A1,​A1,​A1> op)
      • fold

        public static <A1> A1 fold​(A1 z,
                                   scala.Function2<A1,​A1,​A1> op)
      • aggregate

        public static <B> B aggregate​(scala.Function0<B> z,
                                      scala.Function2<B,​A,​B> seqop,
                                      scala.Function2<B,​B,​B> combop)
      • sum

        public static <B> B sum​(scala.math.Numeric<B> num)
      • product

        public static <B> B product​(scala.math.Numeric<B> num)
      • min

        public static <B> A min​(scala.math.Ordering<B> cmp)
      • max

        public static <B> A max​(scala.math.Ordering<B> cmp)
      • maxBy

        public static <B> A maxBy​(scala.Function1<A,​B> f,
                                  scala.math.Ordering<B> cmp)
      • minBy

        public static <B> A minBy​(scala.Function1<A,​B> f,
                                  scala.math.Ordering<B> cmp)
      • toSet

        public static <B> scala.collection.immutable.Set<B> toSet()
      • toVector

        public static scala.collection.immutable.Vector<A> toVector()
      • toMap

        public static <T,​U> scala.collection.immutable.Map<T,​U> toMap​(scala.Predef.$less$colon$less<A,​scala.Tuple2<T,​U>> ev)
      • mkString

        public static java.lang.String mkString​(java.lang.String start,
                                                java.lang.String sep,
                                                java.lang.String end)
      • mkString

        public static java.lang.String mkString​(java.lang.String sep)
      • mkString

        public static java.lang.String mkString()
      • addString

        public static scala.collection.mutable.StringBuilder addString​(scala.collection.mutable.StringBuilder b,
                                                                       java.lang.String start,
                                                                       java.lang.String sep,
                                                                       java.lang.String end)
      • addString

        public static scala.collection.mutable.StringBuilder addString​(scala.collection.mutable.StringBuilder b,
                                                                       java.lang.String sep)
      • addString

        public static scala.collection.mutable.StringBuilder addString​(scala.collection.mutable.StringBuilder b)
      • par

        public static ParRepr par()
      • repr

        public static Repr repr()
      • isTraversableAgain

        public static final boolean isTraversableAgain()
      • hasDefiniteSize

        public static boolean hasDefiniteSize()
      • $plus$plus$colon

        public static <B,​That> That $plus$plus$colon​(scala.collection.TraversableOnce<B> that,
                                                           scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • $plus$plus$colon

        public static <B,​That> That $plus$plus$colon​(scala.collection.Traversable<B> that,
                                                           scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • map

        public static <B,​That> That map​(scala.Function1<A,​B> f,
                                              scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • flatMap

        public static <B,​That> That flatMap​(scala.Function1<A,​scala.collection.GenTraversableOnce<B>> f,
                                                  scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • filterImpl

        public static Repr filterImpl​(scala.Function1<A,​java.lang.Object> p,
                                      boolean isFlipped)
      • filter

        public static Repr filter​(scala.Function1<A,​java.lang.Object> p)
      • filterNot

        public static Repr filterNot​(scala.Function1<A,​java.lang.Object> p)
      • collect

        public static <B,​That> That collect​(scala.PartialFunction<A,​B> pf,
                                                  scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • partition

        public static scala.Tuple2<Repr,​Repr> partition​(scala.Function1<A,​java.lang.Object> p)
      • groupBy

        public static <K> scala.collection.immutable.Map<K,​Repr> groupBy​(scala.Function1<A,​K> f)
      • scan

        public static <B,​That> That scan​(B z,
                                               scala.Function2<B,​B,​B> op,
                                               scala.collection.generic.CanBuildFrom<Repr,​B,​That> cbf)
      • scanLeft

        public static <B,​That> That scanLeft​(B z,
                                                   scala.Function2<B,​A,​B> op,
                                                   scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • scanRight

        public static <B,​That> That scanRight​(B z,
                                                    scala.Function2<A,​B,​B> op,
                                                    scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • headOption

        public static scala.Option<A> headOption()
      • lastOption

        public static scala.Option<A> lastOption()
      • sliceWithKnownDelta

        public static Repr sliceWithKnownDelta​(int from,
                                               int until,
                                               int delta)
      • sliceWithKnownBound

        public static Repr sliceWithKnownBound​(int from,
                                               int until)
      • tails

        public static scala.collection.Iterator<Repr> tails()
      • inits

        public static scala.collection.Iterator<Repr> inits()
      • toTraversable

        public static scala.collection.Traversable<A> toTraversable()
      • to

        public static <Col> Col to​(scala.collection.generic.CanBuildFrom<scala.runtime.Nothing$,​A,​Col> cbf)
      • withFilter

        public static scala.collection.generic.FilterMonadic<A,​Repr> withFilter​(scala.Function1<A,​java.lang.Object> p)
      • isEmpty

        public abstract static boolean isEmpty()
      • genericBuilder

        public static <B> scala.collection.mutable.Builder<B,​CC> genericBuilder()
      • unzip

        public static <A1,​A2> scala.Tuple2<CC,​CC> unzip​(scala.Function1<A,​scala.Tuple2<A1,​A2>> asPair)
      • unzip3

        public static <A1,​A2,​A3> scala.Tuple3<CC,​CC,​CC> unzip3​(scala.Function1<A,​scala.Tuple3<A1,​A2,​A3>> asTriple)
      • flatten

        public static <B> CC flatten​(scala.Function1<A,​scala.collection.GenTraversableOnce<B>> asTraversable)
      • transpose

        public static <B> CC transpose​(scala.Function1<A,​scala.collection.GenTraversableOnce<B>> asTraversable)
      • toIterable

        public static scala.collection.Iterable<A> toIterable()
      • toIterator

        public static scala.collection.Iterator<A> toIterator()
      • sliding

        public static scala.collection.Iterator<Repr> sliding​(int size)
      • sliding

        public static scala.collection.Iterator<Repr> sliding​(int size,
                                                              int step)
      • zipAll

        public static <B,​A1,​That> That zipAll​(scala.collection.GenIterable<B> that,
                                                          A1 thisElem,
                                                          B thatElem,
                                                          scala.collection.generic.CanBuildFrom<Repr,​scala.Tuple2<A1,​B>,​That> bf)
      • toStream

        public static scala.collection.immutable.Stream<A> toStream()
      • canEqual

        public static boolean canEqual​(java.lang.Object that)
      • apply$mcZD$sp

        public static boolean apply$mcZD$sp​(double v1)
      • apply$mcDD$sp

        public static double apply$mcDD$sp​(double v1)
      • apply$mcFD$sp

        public static float apply$mcFD$sp​(double v1)
      • apply$mcID$sp

        public static int apply$mcID$sp​(double v1)
      • apply$mcJD$sp

        public static long apply$mcJD$sp​(double v1)
      • apply$mcVD$sp

        public static void apply$mcVD$sp​(double v1)
      • apply$mcZF$sp

        public static boolean apply$mcZF$sp​(float v1)
      • apply$mcDF$sp

        public static double apply$mcDF$sp​(float v1)
      • apply$mcFF$sp

        public static float apply$mcFF$sp​(float v1)
      • apply$mcIF$sp

        public static int apply$mcIF$sp​(float v1)
      • apply$mcJF$sp

        public static long apply$mcJF$sp​(float v1)
      • apply$mcVF$sp

        public static void apply$mcVF$sp​(float v1)
      • apply$mcZI$sp

        public static boolean apply$mcZI$sp​(int v1)
      • apply$mcDI$sp

        public static double apply$mcDI$sp​(int v1)
      • apply$mcFI$sp

        public static float apply$mcFI$sp​(int v1)
      • apply$mcII$sp

        public static int apply$mcII$sp​(int v1)
      • apply$mcJI$sp

        public static long apply$mcJI$sp​(int v1)
      • apply$mcVI$sp

        public static void apply$mcVI$sp​(int v1)
      • apply$mcZJ$sp

        public static boolean apply$mcZJ$sp​(long v1)
      • apply$mcDJ$sp

        public static double apply$mcDJ$sp​(long v1)
      • apply$mcFJ$sp

        public static float apply$mcFJ$sp​(long v1)
      • apply$mcIJ$sp

        public static int apply$mcIJ$sp​(long v1)
      • apply$mcJJ$sp

        public static long apply$mcJJ$sp​(long v1)
      • apply$mcVJ$sp

        public static void apply$mcVJ$sp​(long v1)
      • compose

        public static <A> scala.Function1<A,​R> compose​(scala.Function1<A,​T1> g)
      • isDefinedAt

        public abstract static boolean isDefinedAt​(A x)
      • orElse

        public static <A1 extends A,​B1> scala.PartialFunction<A1,​B1> orElse​(scala.PartialFunction<A1,​B1> that)
      • andThen

        public static <C> scala.PartialFunction<A,​C> andThen​(scala.Function1<B,​C> k)
      • lift

        public static scala.Function1<A,​scala.Option<B>> lift()
      • applyOrElse

        public static <A1 extends A,​B1> B1 applyOrElse​(A1 x,
                                                             scala.Function1<A1,​B1> default_)
      • runWith

        public static <U> scala.Function1<A,​java.lang.Object> runWith​(scala.Function1<B,​U> action)
      • prefixLength

        public static int prefixLength​(scala.Function1<A,​java.lang.Object> p)
      • lastIndexOf

        public static <B> int lastIndexOf​(B elem)
      • lastIndexOf

        public static <B> int lastIndexOf​(B elem,
                                          int end)
      • lastIndexWhere

        public static int lastIndexWhere​(scala.Function1<A,​java.lang.Object> p)
      • startsWith

        public static <B> boolean startsWith​(scala.collection.GenSeq<B> that)
      • equals

        public static boolean equals​(java.lang.Object that)
      • length

        public abstract static int length()
      • size

        public static int size()
      • permutations

        public static scala.collection.Iterator<Repr> permutations()
      • combinations

        public static scala.collection.Iterator<Repr> combinations​(int n)
      • reverseMap

        public static <B,​That> That reverseMap​(scala.Function1<A,​B> f,
                                                     scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • indexOfSlice

        public static <B> int indexOfSlice​(scala.collection.GenSeq<B> that)
      • indexOfSlice

        public static <B> int indexOfSlice​(scala.collection.GenSeq<B> that,
                                           int from)
      • lastIndexOfSlice

        public static <B> int lastIndexOfSlice​(scala.collection.GenSeq<B> that)
      • lastIndexOfSlice

        public static <B> int lastIndexOfSlice​(scala.collection.GenSeq<B> that,
                                               int end)
      • containsSlice

        public static <B> boolean containsSlice​(scala.collection.GenSeq<B> that)
      • contains

        public static <A1> boolean contains​(A1 elem)
      • union

        public static <B,​That> That union​(scala.collection.GenSeq<B> that,
                                                scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • diff

        public static <B> Repr diff​(scala.collection.GenSeq<B> that)
      • intersect

        public static <B> Repr intersect​(scala.collection.GenSeq<B> that)
      • distinct

        public static Repr distinct()
      • patch

        public static <B,​That> That patch​(int from,
                                                scala.collection.GenSeq<B> patch,
                                                int replaced,
                                                scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • updated

        public static <B,​That> That updated​(int index,
                                                  B elem,
                                                  scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • $plus$colon

        public static <B,​That> That $plus$colon​(B elem,
                                                      scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • $colon$plus

        public static <B,​That> That $colon$plus​(B elem,
                                                      scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • padTo

        public static <B,​That> That padTo​(int len,
                                                B elem,
                                                scala.collection.generic.CanBuildFrom<Repr,​B,​That> bf)
      • corresponds

        public static <B> boolean corresponds​(scala.collection.GenSeq<B> that,
                                              scala.Function2<A,​B,​java.lang.Object> p)
      • sortWith

        public static Repr sortWith​(scala.Function2<A,​A,​java.lang.Object> lt)
      • sortBy

        public static <B> Repr sortBy​(scala.Function1<A,​B> f,
                                      scala.math.Ordering<B> ord)
      • sorted

        public static <B> Repr sorted​(scala.math.Ordering<B> ord)
      • indices

        public static scala.collection.immutable.Range indices()
      • view

        public static java.lang.Object view()
      • view

        public static scala.collection.SeqView<A,​Repr> view​(int from,
                                                                  int until)
      • toSeq

        public static scala.collection.immutable.Seq<A> toSeq()
      • parCombiner

        protected static scala.collection.parallel.Combiner<A,​scala.collection.parallel.immutable.ParSeq<A>> parCombiner()
      • hashCode

        public static int hashCode()
      • thisCollection

        protected static scala.collection.IndexedSeq<A> thisCollection()
      • toCollection

        protected static scala.collection.IndexedSeq<A> toCollection​(Repr repr)
      • toBuffer

        public static <A1> scala.collection.mutable.Buffer<A1> toBuffer()
      • sizeHintIfCheap

        protected static int sizeHintIfCheap()
      • companion

        public static scala.collection.generic.GenericCompanion<scala.collection.immutable.IndexedSeq> companion()
      • toIndexedSeq

        public static scala.collection.immutable.IndexedSeq<A> toIndexedSeq()
      • seq

        public static scala.collection.immutable.IndexedSeq<A> seq()
      • forall

        public static boolean forall​(scala.Function1<A,​java.lang.Object> p)
      • exists

        public static boolean exists​(scala.Function1<A,​java.lang.Object> p)
      • find

        public static scala.Option<A> find​(scala.Function1<A,​java.lang.Object> p)
      • foldLeft

        public static <B> B foldLeft​(B z,
                                     scala.Function2<B,​A,​B> op)
      • foldRight

        public static <B> B foldRight​(B z,
                                      scala.Function2<A,​B,​B> op)
      • reduceLeft

        public static <B> B reduceLeft​(scala.Function2<B,​A,​B> op)
      • reduceRight

        public static <B> B reduceRight​(scala.Function2<A,​B,​B> op)
      • zip

        public static <A1,​B,​That> That zip​(scala.collection.GenIterable<B> that,
                                                       scala.collection.generic.CanBuildFrom<Repr,​scala.Tuple2<A1,​B>,​That> bf)
      • zipWithIndex

        public static <A1,​That> That zipWithIndex​(scala.collection.generic.CanBuildFrom<Repr,​scala.Tuple2<A1,​java.lang.Object>,​That> bf)
      • sameElements

        public static <B> boolean sameElements​(scala.collection.GenIterable<B> that)
      • lengthCompare

        public static int lengthCompare​(int len)
      • segmentLength

        public static int segmentLength​(scala.Function1<A,​java.lang.Object> p,
                                        int from)
      • lastIndexWhere

        public static int lastIndexWhere​(scala.Function1<A,​java.lang.Object> p,
                                         int end)
      • reverse

        public static Repr reverse()
      • reverseIterator

        public static scala.collection.Iterator<A> reverseIterator()
      • startsWith

        public static <B> boolean startsWith​(scala.collection.GenSeq<B> that,
                                             int offset)
      • endsWith

        public static <B> boolean endsWith​(scala.collection.GenSeq<B> that)
      • toList

        public static scala.collection.immutable.List<A> toList()
      • apply

        public abstract byte apply​(int idx)
        Specified by:
        apply in interface scala.collection.GenSeqLike<java.lang.Object,​scala.collection.GenSeq<java.lang.Object>>
        Specified by:
        apply in interface scala.collection.SeqLike<java.lang.Object,​scala.collection.Seq<java.lang.Object>>
      • stringPrefix

        public final java.lang.String stringPrefix()
        Specified by:
        stringPrefix in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        stringPrefix in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • newBuilder

        protected ByteStringBuilder newBuilder()
        Specified by:
        newBuilder in interface scala.collection.generic.GenericTraversableTemplate<java.lang.Object,​scala.collection.GenTraversable>
        Specified by:
        newBuilder in interface scala.collection.generic.HasNewBuilder<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        newBuilder in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • iterator

        public ByteIterator iterator()
        Specified by:
        iterator in interface scala.collection.GenIterableLike<java.lang.Object,​scala.collection.GenIterable<java.lang.Object>>
        Specified by:
        iterator in interface scala.collection.IndexedSeqLike<java.lang.Object,​scala.collection.IndexedSeq<java.lang.Object>>
        Specified by:
        iterator in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
      • head

        public byte head()
        Specified by:
        head in interface scala.collection.generic.GenericTraversableTemplate<java.lang.Object,​scala.collection.GenTraversable>
        Specified by:
        head in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        head in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        head in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
        Specified by:
        head in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • tail

        public ByteString tail()
        Specified by:
        tail in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        tail in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        tail in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • last

        public byte last()
        Specified by:
        last in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        last in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        last in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • init

        public ByteString init()
        Specified by:
        init in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        init in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        init in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • take

        public ByteString take​(int n)
        Specified by:
        take in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        take in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        take in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
        Specified by:
        take in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • takeRight

        public ByteString takeRight​(int n)
        Specified by:
        takeRight in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        takeRight in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
      • slice

        public ByteString slice​(int from,
                                int until)
        Specified by:
        slice in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        slice in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        slice in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
        Specified by:
        slice in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • drop

        public ByteString drop​(int n)
        Specified by:
        drop in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        drop in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        drop in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
        Specified by:
        drop in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • dropRight

        public ByteString dropRight​(int n)
        Specified by:
        dropRight in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        dropRight in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
      • takeWhile

        public ByteString takeWhile​(scala.Function1<java.lang.Object,​java.lang.Object> p)
        Specified by:
        takeWhile in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        takeWhile in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        takeWhile in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
        Specified by:
        takeWhile in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • dropWhile

        public ByteString dropWhile​(scala.Function1<java.lang.Object,​java.lang.Object> p)
        Specified by:
        dropWhile in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        dropWhile in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        dropWhile in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • span

        public scala.Tuple2<ByteString,​ByteString> span​(scala.Function1<java.lang.Object,​java.lang.Object> p)
        Specified by:
        span in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        span in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        span in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • splitAt

        public scala.Tuple2<ByteString,​ByteString> splitAt​(int n)
        Specified by:
        splitAt in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        splitAt in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        splitAt in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
      • indexWhere

        public int indexWhere​(scala.Function1<java.lang.Object,​java.lang.Object> p)
        Specified by:
        indexWhere in interface scala.collection.GenSeqLike<java.lang.Object,​scala.collection.GenSeq<java.lang.Object>>
      • indexOf

        public <B> int indexOf​(B elem)
        Specified by:
        indexOf in interface scala.collection.GenSeqLike<java.lang.Object,​scala.collection.GenSeq<java.lang.Object>>
      • grouped

        public scala.collection.Iterator<ByteString> grouped​(int size)
        Specified by:
        grouped in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface scala.Function1<java.lang.Object,​java.lang.Object>
        Specified by:
        toString in interface scala.collection.SeqLike<java.lang.Object,​scala.collection.Seq<java.lang.Object>>
        Specified by:
        toString in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Overrides:
        toString in class java.lang.Object
      • toArray

        protected byte[] toArray()
        Java API: copy this ByteString into a fresh byte array

        Returns:
        this ByteString copied into a byte array
      • toArray

        public <B> java.lang.Object toArray​(scala.reflect.ClassTag<B> arg0)
        Specified by:
        toArray in interface scala.collection.GenTraversableOnce<java.lang.Object>
        Specified by:
        toArray in interface scala.collection.TraversableOnce<java.lang.Object>
      • copyToArray

        public <B> void copyToArray​(java.lang.Object xs,
                                    int start,
                                    int len)
        Specified by:
        copyToArray in interface scala.collection.GenTraversableOnce<java.lang.Object>
        Specified by:
        copyToArray in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        copyToArray in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
        Specified by:
        copyToArray in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        copyToArray in interface scala.collection.TraversableOnce<java.lang.Object>
      • foreach

        public <U> void foreach​(scala.Function1<java.lang.Object,​U> f)
        Specified by:
        foreach in interface scala.collection.generic.FilterMonadic<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        foreach in interface scala.collection.generic.GenericTraversableTemplate<java.lang.Object,​scala.collection.GenTraversable>
        Specified by:
        foreach in interface scala.collection.GenTraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        foreach in interface scala.collection.GenTraversableOnce<java.lang.Object>
        Specified by:
        foreach in interface scala.collection.IndexedSeqOptimized<java.lang.Object,​ByteString>
        Specified by:
        foreach in interface scala.collection.IterableLike<java.lang.Object,​scala.collection.Iterable<java.lang.Object>>
        Specified by:
        foreach in interface scala.collection.TraversableLike<java.lang.Object,​scala.collection.Traversable<java.lang.Object>>
        Specified by:
        foreach in interface scala.collection.TraversableOnce<java.lang.Object>
      • writeToOutputStream

        public abstract void writeToOutputStream​(java.io.ObjectOutputStream os)
      • $plus$plus

        public abstract ByteString $plus$plus​(ByteString that)
        Efficiently concatenate another ByteString.
        Parameters:
        that - (undocumented)
        Returns:
        (undocumented)
      • concat

        public ByteString concat​(ByteString that)
        Java API: efficiently concatenate another ByteString.
        Parameters:
        that - (undocumented)
        Returns:
        (undocumented)
      • copyToBuffer

        public int copyToBuffer​(java.nio.ByteBuffer buffer)
        Copy as many bytes as possible to a ByteBuffer, starting from it's current position. This method will not overflow the buffer.

        Parameters:
        buffer - a ByteBuffer to copy bytes to
        Returns:
        the number of bytes actually copied
      • compact

        public abstract CompactByteString compact()
        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.
        Returns:
        (undocumented)
      • isCompact

        public abstract boolean isCompact()
        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.
        Returns:
        (undocumented)
      • asByteBuffer

        public abstract java.nio.ByteBuffer asByteBuffer()
        Returns a read-only ByteBuffer that directly wraps this ByteString if it is not fragmented.
        Returns:
        (undocumented)
      • asByteBuffers

        public abstract 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. Will always have at least one entry.
        Returns:
        (undocumented)
      • getByteBuffers

        public java.lang.Iterable<java.nio.ByteBuffer> getByteBuffers()
        Java API: Returns an Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments. Will always have at least one entry.
        Returns:
        (undocumented)
      • toByteBuffer

        public java.nio.ByteBuffer toByteBuffer()
        Creates a new ByteBuffer with a copy of all bytes contained in this ByteString.
        Returns:
        (undocumented)
      • utf8String

        public final java.lang.String utf8String()
        Decodes this ByteString as a UTF-8 encoded String.
        Returns:
        (undocumented)
      • decodeString

        public abstract java.lang.String decodeString​(java.lang.String charset)
        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.
        Parameters:
        charset - (undocumented)
        Returns:
        (undocumented)
      • decodeString

        public abstract java.lang.String decodeString​(java.nio.charset.Charset charset)
        Decodes this ByteString using a charset to produce a String. Avoids Charset.forName lookup in String internals, thus is preferable to decodeString(charset: String).
        Parameters:
        charset - (undocumented)
        Returns:
        (undocumented)
      • mapI

        public final ByteString mapI​(scala.Function1<java.lang.Object,​java.lang.Object> f)
        map method that will automatically cast Int back into Byte.
        Parameters:
        f - (undocumented)
        Returns:
        (undocumented)
      • foreach$mZc$sp

        public void foreach$mZc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)
      • foreach$mBc$sp

        public void foreach$mBc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)
      • foreach$mCc$sp

        public void foreach$mCc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)
      • foreach$mDc$sp

        public void foreach$mDc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)
      • foreach$mFc$sp

        public void foreach$mFc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)
      • foreach$mIc$sp

        public void foreach$mIc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)
      • foreach$mJc$sp

        public void foreach$mJc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)
      • foreach$mSc$sp

        public void foreach$mSc$sp​(scala.Function1<java.lang.Object,​java.lang.Object> f)
      • foreach$mVc$sp

        public void foreach$mVc$sp​(scala.Function1<java.lang.Object,​scala.runtime.BoxedUnit> f)