public abstract class CompactByteString extends ByteString implements scala.Serializable
The ByteString is guarantied to be contiguous in memory and to use only as much memory as required for its contents.
ByteString.ByteString1, ByteString.ByteString1$, ByteString.ByteString1C, ByteString.ByteString1C$, ByteString.ByteStrings, ByteString.ByteStrings$
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>
Constructor and Description |
---|
CompactByteString() |
Modifier and Type | Method and Description |
---|---|
static CompactByteString |
apply(byte[] bytes)
Creates a new CompactByteString by copying a byte array.
|
static CompactByteString |
apply(java.nio.ByteBuffer bytes)
Creates a new CompactByteString by copying bytes from a ByteBuffer.
|
static CompactByteString |
apply(scala.collection.Seq<java.lang.Object> bytes)
Creates a new CompactByteString by copying bytes.
|
static <T> CompactByteString |
apply(scala.collection.Seq<T> bytes,
scala.math.Integral<T> num)
Creates a new CompactByteString by converting from integral numbers to bytes.
|
static CompactByteString |
apply(java.lang.String string)
Creates a new CompactByteString by encoding a String as UTF-8.
|
static CompactByteString |
apply(java.lang.String string,
java.lang.String charset)
Creates a new CompactByteString by encoding a String with a charset.
|
CompactByteString |
compact()
Create a new ByteString with all contents compacted into a single,
full byte array.
|
static CompactByteString |
empty() |
static CompactByteString |
fromArray(byte[] array,
int offset,
int length)
Creates a new CompactByteString by copying length bytes starting at offset from
an Array.
|
boolean |
isCompact()
Check whether this ByteString is compact in memory.
|
apply, asByteBuffer, asByteBuffers, canBuildFrom, concat, copyToArray, copyToBuffer, decodeString, drop, dropRight, dropWhile, foreach, fromArray, fromByteBuffer, fromString, fromString, getByteBuffers, head, indexOf, indexWhere, init, iterator, last, mapI, newBuilder, slice, span, splitAt, tail, take, takeRight, takeWhile, toArray, toArray, toByteBuffer, utf8String
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, applyOrElse, isDefinedAt, lift, orElse, runWith
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, toString
hashCode, thisCollection, toBuffer, toCollection
$colon$plus, $plus$colon, combinations, contains, containsSlice, corresponds, diff, distinct, endsWith, indexOfSlice, indexOfSlice, indexWhere, indices, intersect, isEmpty, lastIndexOfSlice, lastIndexOfSlice, lastIndexWhere, length, lengthCompare, padTo, patch, permutations, reverse, reverseIterator, reverseMap, segmentLength, size, sortBy, sorted, sortWith, startsWith, toString, union, updated, view, view
canEqual, exists, find, foldRight, forall, grouped, reduceRight, sameElements, sliding, sliding, toIterable, toIterator, toStream, zip, zipAll, zipWithIndex
$plus$plus, $plus$plus$colon, $plus$plus$colon, collect, filter, filterNot, flatMap, groupBy, hasDefiniteSize, headOption, inits, isTraversableAgain, lastOption, map, partition, repr, scan, scanLeft, scanRight, sliceWithKnownBound, sliceWithKnownDelta, stringPrefix, tails, to, toTraversable, withFilter
$colon$bslash, $div$colon, addString, addString, addString, aggregate, collectFirst, copyToArray, copyToArray, copyToBuffer, count, fold, foldLeft, max, maxBy, min, minBy, mkString, mkString, mkString, nonEmpty, product, reduce, reduceLeft, reduceLeftOption, reduceOption, reduceRightOption, reversed, sum, toList, toMap, toSet, toVector
public static CompactByteString apply(byte[] bytes)
public static CompactByteString apply(scala.collection.Seq<java.lang.Object> bytes)
public static <T> CompactByteString apply(scala.collection.Seq<T> bytes, scala.math.Integral<T> num)
public static CompactByteString apply(java.nio.ByteBuffer bytes)
public static CompactByteString apply(java.lang.String string)
public static CompactByteString apply(java.lang.String string, java.lang.String charset)
public static CompactByteString fromArray(byte[] array, int offset, int length)
public static CompactByteString empty()
public boolean isCompact()
ByteString
isCompact
in class ByteString
public CompactByteString compact()
ByteString
compact
in class ByteString