Package akka.util
Class ByteString.ByteString1
- java.lang.Object
-
- akka.util.ByteString
-
- akka.util.ByteString.ByteString1
-
- All Implemented Interfaces:
java.io.Serializable,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>,scala.Serializable
- Enclosing class:
- ByteString
public static final class ByteString.ByteString1 extends ByteString implements scala.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.util.ByteString
ByteString.ByteString1, ByteString.ByteString1$, ByteString.ByteString1C, ByteString.ByteString1C$, ByteString.ByteStrings, ByteString.ByteStrings$, ByteString.Companion, 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 ByteString1()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteString$plus$plus(ByteString that)Efficiently concatenate another ByteString.byteapply(int idx)java.nio.ByteBufferasByteBuffer()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()CompactByteStringcompact()Create a new ByteString with all contents compacted into a single, full byte array.intcopyToBuffer(java.nio.ByteBuffer buffer)Copy as many bytes as possible to a ByteBuffer, starting from it's current position.ByteStringdecodeBase64()java.lang.StringdecodeString(java.lang.String charset)Decodes this ByteString using a charset to produce a String.java.lang.StringdecodeString(java.nio.charset.Charset charset)Decodes this ByteString using a charset to produce a String.ByteStringdrop(int n)ByteString.ByteString1drop1(int n)INTERNAL APIByteStringdropRight(int n)ByteString.ByteString1dropRight1(int n)INTERNAL APIByteStringencodeBase64()Returns a ByteString which is the Base64 representation of this ByteString<B> intindexOf(B elem)<B> intindexOf(B elem, int from)booleanisCompact()Check whether this ByteString is compact in memory.ByteIterator.ByteArrayIteratoriterator()intlength()ByteStringslice(int from, int until)ByteStringtake(int n)ByteString.ByteString1take1(int n)protected java.lang.ObjectwriteReplace()intwriteToBuffer(java.nio.ByteBuffer buffer)INTERNAL API: Specialized for internal use, writing multiple ByteString1C into the same ByteBuffer.voidwriteToOutputStream(java.io.ObjectOutputStream os)-
Methods inherited from class akka.util.ByteString
canBuildFrom, concat, copyToArray, createBuilder, dropWhile, empty, emptyByteString, foreach, foreach$mBc$sp, foreach$mCc$sp, foreach$mDc$sp, foreach$mFc$sp, foreach$mIc$sp, foreach$mJc$sp, foreach$mSc$sp, foreach$mVc$sp, foreach$mZc$sp, fromArray, fromArray, fromArrayUnsafe, fromArrayUnsafe, fromByteBuffer, fromInts, fromInts, fromString, fromString, fromString, getByteBuffers, grouped, head, indexWhere, init, last, mapI, newBuilder, span, splitAt, stringPrefix, tail, takeRight, takeWhile, toArray, toArray, toByteBuffer, toString, UTF_8, utf8String
-
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, isDefinedAt, lastIndexOf, lastIndexOf, lastIndexWhere, prefixLength, startsWith
-
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.PartialFunction
andThen, applyOrElse, isDefinedAt, lift, orElse, runWith
-
Methods inherited from interface scala.collection.SeqLike
$colon$plus, $plus$colon, combinations, contains, containsSlice, corresponds, diff, distinct, indexOfSlice, indexOfSlice, indices, intersect, lastIndexOfSlice, lastIndexOfSlice, 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
-
-
-
-
Method Detail
-
length
public int length()
- Specified by:
lengthin interfacescala.collection.GenSeqLike<java.lang.Object,scala.collection.GenSeq<java.lang.Object>>- Specified by:
lengthin interfacescala.collection.SeqLike<java.lang.Object,scala.collection.Seq<java.lang.Object>>
-
apply
public byte apply(int idx)
- Specified by:
applyin interfacescala.collection.GenSeqLike<java.lang.Object,scala.collection.GenSeq<java.lang.Object>>- Specified by:
applyin interfacescala.collection.SeqLike<java.lang.Object,scala.collection.Seq<java.lang.Object>>- Specified by:
applyin classByteString
-
iterator
public ByteIterator.ByteArrayIterator iterator()
- Specified by:
iteratorin interfacescala.collection.GenIterableLike<java.lang.Object,scala.collection.GenIterable<java.lang.Object>>- Specified by:
iteratorin interfacescala.collection.IndexedSeqLike<java.lang.Object,scala.collection.IndexedSeq<java.lang.Object>>- Specified by:
iteratorin interfacescala.collection.IterableLike<java.lang.Object,scala.collection.Iterable<java.lang.Object>>- Overrides:
iteratorin classByteString
-
writeToOutputStream
public void writeToOutputStream(java.io.ObjectOutputStream os)
- Specified by:
writeToOutputStreamin classByteString
-
isCompact
public boolean isCompact()
Description copied from class:ByteStringCheck 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.- Specified by:
isCompactin classByteString- Returns:
- (undocumented)
-
byteStringCompanion
public ByteString.ByteString1$ byteStringCompanion()
- Specified by:
byteStringCompanionin classByteString
-
dropRight
public ByteString dropRight(int n)
- Specified by:
dropRightin interfacescala.collection.IndexedSeqOptimized<java.lang.Object,ByteString>- Specified by:
dropRightin interfacescala.collection.IterableLike<java.lang.Object,scala.collection.Iterable<java.lang.Object>>- Overrides:
dropRightin classByteString
-
dropRight1
public ByteString.ByteString1 dropRight1(int n)
INTERNAL API
-
drop
public ByteString drop(int n)
- Specified by:
dropin interfacescala.collection.GenTraversableLike<java.lang.Object,scala.collection.Traversable<java.lang.Object>>- Specified by:
dropin interfacescala.collection.IndexedSeqOptimized<java.lang.Object,ByteString>- Specified by:
dropin interfacescala.collection.IterableLike<java.lang.Object,scala.collection.Iterable<java.lang.Object>>- Specified by:
dropin interfacescala.collection.TraversableLike<java.lang.Object,scala.collection.Traversable<java.lang.Object>>- Overrides:
dropin classByteString
-
drop1
public ByteString.ByteString1 drop1(int n)
INTERNAL API
-
take
public ByteString take(int n)
- Specified by:
takein interfacescala.collection.GenTraversableLike<java.lang.Object,scala.collection.Traversable<java.lang.Object>>- Specified by:
takein interfacescala.collection.IndexedSeqOptimized<java.lang.Object,ByteString>- Specified by:
takein interfacescala.collection.IterableLike<java.lang.Object,scala.collection.Iterable<java.lang.Object>>- Specified by:
takein interfacescala.collection.TraversableLike<java.lang.Object,scala.collection.Traversable<java.lang.Object>>- Overrides:
takein classByteString
-
take1
public ByteString.ByteString1 take1(int n)
-
slice
public ByteString slice(int from, int until)
- Specified by:
slicein interfacescala.collection.GenTraversableLike<java.lang.Object,scala.collection.Traversable<java.lang.Object>>- Specified by:
slicein interfacescala.collection.IndexedSeqOptimized<java.lang.Object,ByteString>- Specified by:
slicein interfacescala.collection.IterableLike<java.lang.Object,scala.collection.Iterable<java.lang.Object>>- Specified by:
slicein interfacescala.collection.TraversableLike<java.lang.Object,scala.collection.Traversable<java.lang.Object>>- Overrides:
slicein classByteString
-
copyToBuffer
public int copyToBuffer(java.nio.ByteBuffer buffer)
Description copied from class:ByteStringCopy as many bytes as possible to a ByteBuffer, starting from it's current position. This method will not overflow the buffer.- Overrides:
copyToBufferin classByteString- Parameters:
buffer- a ByteBuffer to copy bytes to- Returns:
- the number of bytes actually copied
-
writeToBuffer
public int writeToBuffer(java.nio.ByteBuffer buffer)
INTERNAL API: Specialized for internal use, writing multiple ByteString1C into the same ByteBuffer.
-
compact
public CompactByteString compact()
Description copied from class:ByteStringCreate 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.- Specified by:
compactin classByteString- Returns:
- (undocumented)
-
asByteBuffer
public java.nio.ByteBuffer asByteBuffer()
Description copied from class:ByteStringReturns a read-only ByteBuffer that directly wraps this ByteString if it is not fragmented.- Specified by:
asByteBufferin classByteString- Returns:
- (undocumented)
-
asByteBuffers
public scala.collection.immutable.Iterable<java.nio.ByteBuffer> asByteBuffers()
Description copied from class:ByteStringScala API: Returns an immutable Iterable of read-only ByteBuffers that directly wraps this ByteStrings all fragments. Will always have at least one entry.- Specified by:
asByteBuffersin classByteString- Returns:
- (undocumented)
-
decodeString
public java.lang.String decodeString(java.lang.String charset)
Description copied from class:ByteStringDecodes this ByteString using a charset to produce a String. If you have aCharsetinstance available, usedecodeString(charset: java.nio.charset.Charsetinstead.- Specified by:
decodeStringin classByteString- Parameters:
charset- (undocumented)- Returns:
- (undocumented)
-
decodeString
public java.lang.String decodeString(java.nio.charset.Charset charset)
Description copied from class:ByteStringDecodes this ByteString using a charset to produce a String. Avoids Charset.forName lookup in String internals, thus is preferable todecodeString(charset: String).- Specified by:
decodeStringin classByteString- Parameters:
charset- (undocumented)- Returns:
- (undocumented)
-
decodeBase64
public ByteString decodeBase64()
- Specified by:
decodeBase64in classByteString
-
encodeBase64
public ByteString encodeBase64()
Description copied from class:ByteStringReturns a ByteString which is the Base64 representation of this ByteString- Specified by:
encodeBase64in classByteString- Returns:
- (undocumented)
-
$plus$plus
public ByteString $plus$plus(ByteString that)
Description copied from class:ByteStringEfficiently concatenate another ByteString.- Specified by:
$plus$plusin classByteString- Parameters:
that- (undocumented)- Returns:
- (undocumented)
-
indexOf
public <B> int indexOf(B elem)
- Specified by:
indexOfin interfacescala.collection.GenSeqLike<java.lang.Object,scala.collection.GenSeq<java.lang.Object>>- Overrides:
indexOfin classByteString
-
indexOf
public <B> int indexOf(B elem, int from)- Specified by:
indexOfin interfacescala.collection.GenSeqLike<java.lang.Object,scala.collection.GenSeq<java.lang.Object>>
-
writeReplace
protected java.lang.Object writeReplace()
-
-