Package akka.util

Class ByteIterator.MultiByteArrayIterator

  • All Implemented Interfaces:
    scala.collection.BufferedIterator<java.lang.Object>, scala.collection.GenTraversableOnce<java.lang.Object>, scala.collection.Iterator<java.lang.Object>, scala.collection.TraversableOnce<java.lang.Object>
    Enclosing class:
    ByteIterator

    public static class ByteIterator.MultiByteArrayIterator
    extends ByteIterator
    • Constructor Detail

      • MultiByteArrayIterator

        public MultiByteArrayIterator()
    • Method Detail

      • hasNext

        public final boolean hasNext()
      • head

        public final byte head()
        Specified by:
        head in interface scala.collection.BufferedIterator<java.lang.Object>
        Specified by:
        head in class ByteIterator
      • next

        public final byte next()
        Specified by:
        next in interface scala.collection.Iterator<java.lang.Object>
        Specified by:
        next in class ByteIterator
      • length

        public final int length()
      • take

        public final ByteIterator.MultiByteArrayIterator take​(int n)
        For performance sensitive code, call take() directly on ByteString (it's optimised there)
        Specified by:
        take in interface scala.collection.Iterator<java.lang.Object>
        Overrides:
        take in class ByteIterator
      • drop

        public final ByteIterator.MultiByteArrayIterator drop​(int n)
        For performance sensitive code, call drop() directly on ByteString (it's optimised there)
        Specified by:
        drop in interface scala.collection.Iterator<java.lang.Object>
        Overrides:
        drop in class ByteIterator
      • copyToArray

        public final <B> void copyToArray​(java.lang.Object xs,
                                          int start,
                                          int len)
      • foreach

        public <U> void foreach​(scala.Function1<java.lang.Object,​U> f)
        Specified by:
        foreach in interface scala.collection.GenTraversableOnce<java.lang.Object>
        Specified by:
        foreach in interface scala.collection.Iterator<java.lang.Object>
        Specified by:
        foreach in interface scala.collection.TraversableOnce<java.lang.Object>
        Overrides:
        foreach in class ByteIterator
      • getToArray

        protected final <A> ByteIterator.MultiByteArrayIterator getToArray​(java.lang.Object xs,
                                                                           int offset,
                                                                           int n,
                                                                           int elemSize,
                                                                           scala.Function0<A> getSingle,
                                                                           scala.Function3<java.lang.Object,​java.lang.Object,​java.lang.Object,​scala.runtime.BoxedUnit> getMult)
      • getBytes

        public ByteIterator.MultiByteArrayIterator getBytes​(byte[] xs,
                                                            int offset,
                                                            int n)
        Description copied from class: ByteIterator
        Get a specific number of Bytes from this iterator. In contrast to copyToArray, this method will fail if length &lt; n or if (xs.length - offset) &lt; n.
        Specified by:
        getBytes in class ByteIterator
        Parameters:
        xs - (undocumented)
        offset - (undocumented)
        n - (undocumented)
        Returns:
        (undocumented)
      • getShorts

        public ByteIterator.MultiByteArrayIterator getShorts​(short[] xs,
                                                             int offset,
                                                             int n,
                                                             java.nio.ByteOrder byteOrder)
        Description copied from class: ByteIterator
        Get a number of Shorts from this iterator.
        Specified by:
        getShorts in class ByteIterator
        Parameters:
        xs - (undocumented)
        offset - (undocumented)
        n - (undocumented)
        byteOrder - (undocumented)
        Returns:
        (undocumented)
      • getInts

        public ByteIterator.MultiByteArrayIterator getInts​(int[] xs,
                                                           int offset,
                                                           int n,
                                                           java.nio.ByteOrder byteOrder)
        Description copied from class: ByteIterator
        Get a number of Ints from this iterator.
        Specified by:
        getInts in class ByteIterator
        Parameters:
        xs - (undocumented)
        offset - (undocumented)
        n - (undocumented)
        byteOrder - (undocumented)
        Returns:
        (undocumented)
      • getLongs

        public ByteIterator.MultiByteArrayIterator getLongs​(long[] xs,
                                                            int offset,
                                                            int n,
                                                            java.nio.ByteOrder byteOrder)
        Description copied from class: ByteIterator
        Get a number of Longs from this iterator.
        Specified by:
        getLongs in class ByteIterator
        Parameters:
        xs - (undocumented)
        offset - (undocumented)
        n - (undocumented)
        byteOrder - (undocumented)
        Returns:
        (undocumented)
      • getFloats

        public ByteIterator.MultiByteArrayIterator getFloats​(float[] xs,
                                                             int offset,
                                                             int n,
                                                             java.nio.ByteOrder byteOrder)
        Description copied from class: ByteIterator
        Get a number of Floats from this iterator.
        Specified by:
        getFloats in class ByteIterator
        Parameters:
        xs - (undocumented)
        offset - (undocumented)
        n - (undocumented)
        byteOrder - (undocumented)
        Returns:
        (undocumented)
      • getDoubles

        public ByteIterator.MultiByteArrayIterator getDoubles​(double[] xs,
                                                              int offset,
                                                              int n,
                                                              java.nio.ByteOrder byteOrder)
        Description copied from class: ByteIterator
        Get a number of Doubles from this iterator.
        Specified by:
        getDoubles in class ByteIterator
        Parameters:
        xs - (undocumented)
        offset - (undocumented)
        n - (undocumented)
        byteOrder - (undocumented)
        Returns:
        (undocumented)
      • copyToBuffer

        public int copyToBuffer​(java.nio.ByteBuffer buffer)
        For performance sensitive code, call copyToBuffer() directly on ByteString (it's optimised there)
        Specified by:
        copyToBuffer in class ByteIterator
      • asInputStream

        public java.io.InputStream asInputStream()
        Description copied from class: ByteIterator
        Directly wraps this ByteIterator in an InputStream without copying. Read and skip operations on the stream will advance the iterator accordingly.
        Specified by:
        asInputStream in class ByteIterator
        Returns:
        (undocumented)
      • foreach$mZc$sp

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

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

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

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

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

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

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

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

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