Package akka.util

Class ByteIterator.ByteArrayIterator

  • All Implemented Interfaces:
    scala.collection.BufferedIterator<java.lang.Object>, scala.collection.IterableOnce<java.lang.Object>, scala.collection.IterableOnceOps<java.lang.Object,​scala.collection.Iterator,​scala.collection.Iterator<java.lang.Object>>, scala.collection.Iterator<java.lang.Object>
    Enclosing class:
    ByteIterator

    public static class ByteIterator.ByteArrayIterator
    extends ByteIterator
    • Constructor Detail

      • ByteArrayIterator

        public ByteArrayIterator()
    • Method Detail

      • array

        public byte[] array()
      • from

        public int from()
      • until

        public int until()
      • 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
      • size

        public final int size()
      • take

        public final ByteIterator.ByteArrayIterator take​(int n)
        Specified by:
        take in interface scala.collection.IterableOnceOps<java.lang.Object,​scala.collection.Iterator,​scala.collection.Iterator<java.lang.Object>>
        Specified by:
        take in interface scala.collection.Iterator<java.lang.Object>
        Overrides:
        take in class ByteIterator
      • drop

        public final ByteIterator.ByteArrayIterator drop​(int n)
        Specified by:
        drop in interface scala.collection.IterableOnceOps<java.lang.Object,​scala.collection.Iterator,​scala.collection.Iterator<java.lang.Object>>
        Specified by:
        drop in interface scala.collection.Iterator<java.lang.Object>
        Overrides:
        drop in class ByteIterator
      • takeWhile

        public final ByteIterator.ByteArrayIterator takeWhile​(scala.Function1<java.lang.Object,​java.lang.Object> p)
        Specified by:
        takeWhile in interface scala.collection.IterableOnceOps<java.lang.Object,​scala.collection.Iterator,​scala.collection.Iterator<java.lang.Object>>
        Specified by:
        takeWhile in interface scala.collection.Iterator<java.lang.Object>
        Overrides:
        takeWhile in class ByteIterator
      • dropWhile

        public final ByteIterator.ByteArrayIterator dropWhile​(scala.Function1<java.lang.Object,​java.lang.Object> p)
        Specified by:
        dropWhile in interface scala.collection.IterableOnceOps<java.lang.Object,​scala.collection.Iterator,​scala.collection.Iterator<java.lang.Object>>
        Specified by:
        dropWhile in interface scala.collection.Iterator<java.lang.Object>
        Overrides:
        dropWhile in class ByteIterator
      • copyToArray

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

        public <B> int copyToArray​(java.lang.Object xs)
      • copyToArray

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

        public ByteIterator.ByteArrayIterator getBytes​(byte[] xs,
                                                       int offset,
                                                       int n)
                                                throws java.util.NoSuchElementException
        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)
        Throws:
        java.util.NoSuchElementException
      • getShorts

        public ByteIterator.ByteArrayIterator 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.ByteArrayIterator 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.ByteArrayIterator 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.ByteArrayIterator 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.ByteArrayIterator 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)
        Description copied from class: ByteIterator
        For performance sensitive code, call take() 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)