Packages

abstract class IPSetReader extends Iterator[IPBlock]

A reader of binary SiLK IPset files. This is usable as an Iterator over IPBlock objects.

Example:
  1. This example uses the single argument form of the companion object's ofInputStream() method to read the IPset file "example.set"; the code may be used outside of Hadoop.

    val stream = new java.io.FileInputStream("example.set")
    val ipset = IPSetReader.ofInputStream(stream)
    ipset.hasNext
    val ipblock = ipset.next()
    println(ipblock.min + "/" + ipblock.prefixLength)
See also

the companion object for more details

Linear Supertypes
Iterator[IPBlock], TraversableOnce[IPBlock], GenTraversableOnce[IPBlock], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IPSetReader
  2. Iterator
  3. TraversableOnce
  4. GenTraversableOnce
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IPSetReader(reader: BufferReader, header: Header)
    Attributes
    protected

Type Members

  1. class GroupedIterator[B >: A] extends AbstractIterator[Seq[B]] with Iterator[Seq[B]]
    Definition Classes
    Iterator

Abstract Value Members

  1. abstract def containsIPv6: Boolean

    Whether the IPSetReader returns an Iterator over IPv6Blocks or IPv4Blocks.

    Whether the IPSetReader returns an Iterator over IPv6Blocks or IPv4Blocks.

    returns

    true if the IPBlock objects are IPv6Block

  2. abstract def hasNext: Boolean

    Tests whether this iterator can provide another IPBlock.

    Tests whether this iterator can provide another IPBlock.

    returns

    true if a subsequent call to next() will yield an element, false otherwise.

    Definition Classes
    IPSetReader → Iterator
  3. abstract def next(): IPBlock

    Produces the next IPBlock of this iterator.

    Produces the next IPBlock of this iterator.

    returns

    the next IPBlock of this iterator if hasNext is true

    Definition Classes
    IPSetReader → Iterator
    Exceptions thrown

    java.util.NoSuchElementException when the iterator is depleted

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++[B >: IPBlock](that: ⇒ GenTraversableOnce[B]): Iterator[B]
    Definition Classes
    Iterator
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def addString(b: StringBuilder): StringBuilder
    Definition Classes
    TraversableOnce
  6. def addString(b: StringBuilder, sep: String): StringBuilder
    Definition Classes
    TraversableOnce
  7. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
    Definition Classes
    TraversableOnce
  8. def aggregate[B](z: ⇒ B)(seqop: (B, IPBlock) ⇒ B, combop: (B, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. val bitmap256Length: Int

    Octet-length of the 256-Bitmap

    Octet-length of the 256-Bitmap

    Attributes
    protected
  11. var bufOffset: Int

    Current position (octet offset) in the current buffer.

    Current position (octet offset) in the current buffer.

    Attributes
    protected[this]
  12. var buffer: Array[Byte]

    Current buffer of bytes being processed

    Current buffer of bytes being processed

    Attributes
    protected[this]
  13. def buffered: BufferedIterator[IPBlock]
    Definition Classes
    Iterator
  14. def checkAvailable(avail: Int): Boolean

    Return true if 'avail' octets are available in the buffer, reading more data from the stream if necessary.

    Return true if 'avail' octets are available in the buffer, reading more data from the stream if necessary.

    Attributes
    protected[this]
  15. val cidrBitmapFollows: Int

    For IPset file formats v4 and v5, a special value that indicates that a 256-long bitmap follows the IP address

    For IPset file formats v4 and v5, a special value that indicates that a 256-long bitmap follows the IP address

    Attributes
    protected
  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  17. def collect[B](pf: PartialFunction[IPBlock, B]): Iterator[B]
    Definition Classes
    Iterator
    Annotations
    @migration
    Migration

    (Changed in version 2.8.0) collect has changed. The previous behavior can be reproduced with toSeq.

  18. def collectFirst[B](pf: PartialFunction[IPBlock, B]): Option[B]
    Definition Classes
    TraversableOnce
  19. def contains(elem: Any): Boolean
    Definition Classes
    Iterator
  20. def copyToArray[B >: IPBlock](xs: Array[B], start: Int, len: Int): Unit
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  21. def copyToArray[B >: IPBlock](xs: Array[B]): Unit
    Definition Classes
    TraversableOnce → GenTraversableOnce
  22. def copyToArray[B >: IPBlock](xs: Array[B], start: Int): Unit
    Definition Classes
    TraversableOnce → GenTraversableOnce
  23. def copyToBuffer[B >: IPBlock](dest: Buffer[B]): Unit
    Definition Classes
    TraversableOnce
  24. def corresponds[B](that: GenTraversableOnce[B])(p: (IPBlock, B) ⇒ Boolean): Boolean
    Definition Classes
    Iterator
  25. def count(p: (IPBlock) ⇒ Boolean): Int
    Definition Classes
    TraversableOnce → GenTraversableOnce
  26. def drop(n: Int): Iterator[IPBlock]
    Definition Classes
    Iterator
  27. def dropWhile(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]
    Definition Classes
    Iterator
  28. def duplicate: (Iterator[IPBlock], Iterator[IPBlock])
    Definition Classes
    Iterator
  29. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  31. def exists(p: (IPBlock) ⇒ Boolean): Boolean
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  32. def filter(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]
    Definition Classes
    Iterator
  33. def filterNot(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]
    Definition Classes
    Iterator
  34. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  35. def find(p: (IPBlock) ⇒ Boolean): Option[IPBlock]
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  36. def flatMap[B](f: (IPBlock) ⇒ GenTraversableOnce[B]): Iterator[B]
    Definition Classes
    Iterator
  37. def fold[A1 >: IPBlock](z: A1)(op: (A1, A1) ⇒ A1): A1
    Definition Classes
    TraversableOnce → GenTraversableOnce
  38. def foldLeft[B](z: B)(op: (B, IPBlock) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  39. def foldRight[B](z: B)(op: (IPBlock, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  40. def forall(p: (IPBlock) ⇒ Boolean): Boolean
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  41. def foreach[U](f: (IPBlock) ⇒ U): Unit
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  42. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  43. def grouped[B >: IPBlock](size: Int): GroupedIterator[B]
    Definition Classes
    Iterator
  44. def handleBitmap256(buffer: Array[Byte], offset: Int, swap: Boolean): List[List[Int]]

    Return a List of Pairs of Integers.

    Return a List of Pairs of Integers.

    In each pair, the first value is a location of a high bit in the bitmap, and the second value is the number of consecutive high bits that is also a power of 2. The range of the first value is 0 to 255; the range of the seocond is 1 to 256.

    Attributes
    protected[this]
  45. def hasDefiniteSize: Boolean
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  46. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  47. val header: Header
    Attributes
    protected[this]
  48. def indexOf[B >: IPBlock](elem: B, from: Int): Int
    Definition Classes
    Iterator
  49. def indexOf[B >: IPBlock](elem: B): Int
    Definition Classes
    Iterator
  50. def indexWhere(p: (IPBlock) ⇒ Boolean, from: Int): Int
    Definition Classes
    Iterator
  51. def indexWhere(p: (IPBlock) ⇒ Boolean): Int
    Definition Classes
    Iterator
  52. def isEmpty: Boolean
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  53. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  54. def isTraversableAgain: Boolean
    Definition Classes
    Iterator → GenTraversableOnce
  55. def lenToCidrV4(c: Int): Int

    Takes the number of consecutive high bits returned by handleBitmap256 and returns the CIDR prefix for IPv6 addresses.

    Takes the number of consecutive high bits returned by handleBitmap256 and returns the CIDR prefix for IPv6 addresses.

    Attributes
    protected[this]
  56. def lenToCidrV6(c: Int): Int

    Takes the number of consecutive high bits returned by handleBitmap256 and returns the CIDR prefix for IPv6 addresses.

    Takes the number of consecutive high bits returned by handleBitmap256 and returns the CIDR prefix for IPv6 addresses.

    Attributes
    protected[this]
  57. def length: Int
    Definition Classes
    Iterator
  58. def map[B](f: (IPBlock) ⇒ B): Iterator[B]
    Definition Classes
    Iterator
  59. def max[B >: IPBlock](implicit cmp: Ordering[B]): IPBlock
    Definition Classes
    TraversableOnce → GenTraversableOnce
  60. def maxBy[B](f: (IPBlock) ⇒ B)(implicit cmp: Ordering[B]): IPBlock
    Definition Classes
    TraversableOnce → GenTraversableOnce
  61. def min[B >: IPBlock](implicit cmp: Ordering[B]): IPBlock
    Definition Classes
    TraversableOnce → GenTraversableOnce
  62. def minBy[B](f: (IPBlock) ⇒ B)(implicit cmp: Ordering[B]): IPBlock
    Definition Classes
    TraversableOnce → GenTraversableOnce
  63. def mkString: String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  64. def mkString(sep: String): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  65. def mkString(start: String, sep: String, end: String): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  66. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  67. def nonEmpty: Boolean
    Definition Classes
    TraversableOnce → GenTraversableOnce
  68. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  69. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  70. def padTo[A1 >: IPBlock](len: Int, elem: A1): Iterator[A1]
    Definition Classes
    Iterator
  71. def partition(p: (IPBlock) ⇒ Boolean): (Iterator[IPBlock], Iterator[IPBlock])
    Definition Classes
    Iterator
  72. def patch[B >: IPBlock](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]
    Definition Classes
    Iterator
  73. def product[B >: IPBlock](implicit num: Numeric[B]): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  74. val reader: BufferReader
    Attributes
    protected[this]
  75. def reduce[A1 >: IPBlock](op: (A1, A1) ⇒ A1): A1
    Definition Classes
    TraversableOnce → GenTraversableOnce
  76. def reduceLeft[B >: IPBlock](op: (B, IPBlock) ⇒ B): B
    Definition Classes
    TraversableOnce
  77. def reduceLeftOption[B >: IPBlock](op: (B, IPBlock) ⇒ B): Option[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  78. def reduceOption[A1 >: IPBlock](op: (A1, A1) ⇒ A1): Option[A1]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  79. def reduceRight[B >: IPBlock](op: (IPBlock, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  80. def reduceRightOption[B >: IPBlock](op: (IPBlock, B) ⇒ B): Option[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  81. def reversed: List[IPBlock]
    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  82. def sameElements(that: Iterator[_]): Boolean
    Definition Classes
    Iterator
  83. def scanLeft[B](z: B)(op: (B, IPBlock) ⇒ B): Iterator[B]
    Definition Classes
    Iterator
  84. def scanRight[B](z: B)(op: (IPBlock, B) ⇒ B): Iterator[B]
    Definition Classes
    Iterator
  85. def seq: Iterator[IPBlock]
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  86. def size: Int
    Definition Classes
    TraversableOnce → GenTraversableOnce
  87. def sizeHintIfCheap: Int
    Attributes
    protected[collection]
    Definition Classes
    GenTraversableOnce
  88. def skipBytes(skipLen: Int): Unit

    Read and throw away 'skipLen' bytes from the stream.

    Read and throw away 'skipLen' bytes from the stream. An end-of-file error in this function is not caught.

    Attributes
    protected[this]
  89. def slice(from: Int, until: Int): Iterator[IPBlock]
    Definition Classes
    Iterator
  90. def sliceIterator(from: Int, until: Int): Iterator[IPBlock]
    Attributes
    protected
    Definition Classes
    Iterator
  91. def sliding[B >: IPBlock](size: Int, step: Int): GroupedIterator[B]
    Definition Classes
    Iterator
  92. def span(p: (IPBlock) ⇒ Boolean): (Iterator[IPBlock], Iterator[IPBlock])
    Definition Classes
    Iterator
  93. def sum[B >: IPBlock](implicit num: Numeric[B]): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  94. val swap: Boolean

    Whether to byte-swap the bytes as they are read from the buffer

    Whether to byte-swap the bytes as they are read from the buffer

    Attributes
    protected[this]
  95. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  96. def take(n: Int): Iterator[IPBlock]
    Definition Classes
    Iterator
  97. def takeWhile(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]
    Definition Classes
    Iterator
  98. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, IPBlock, Col[IPBlock]]): Col[IPBlock]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  99. def toArray[B >: IPBlock](implicit arg0: ClassTag[B]): Array[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  100. def toBuffer[B >: IPBlock]: Buffer[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  101. def toIndexedSeq: IndexedSeq[IPBlock]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  102. def toIterable: Iterable[IPBlock]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  103. def toIterator: Iterator[IPBlock]
    Definition Classes
    Iterator → GenTraversableOnce
  104. def toList: List[IPBlock]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  105. def toMap[T, U](implicit ev: <:<[IPBlock, (T, U)]): Map[T, U]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  106. def toSeq: Seq[IPBlock]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  107. def toSet[B >: IPBlock]: Set[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  108. def toStream: Stream[IPBlock]
    Definition Classes
    Iterator → GenTraversableOnce
  109. def toString(): String
    Definition Classes
    Iterator → AnyRef → Any
  110. def toTraversable: Traversable[IPBlock]
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  111. def toVector: Vector[IPBlock]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  112. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  113. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  114. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  115. def withFilter(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]
    Definition Classes
    Iterator
  116. def zip[B](that: Iterator[B]): Iterator[(IPBlock, B)]
    Definition Classes
    Iterator
  117. def zipAll[B, A1 >: IPBlock, B1 >: B](that: Iterator[B], thisElem: A1, thatElem: B1): Iterator[(A1, B1)]
    Definition Classes
    Iterator
  118. def zipWithIndex: Iterator[(IPBlock, Int)]
    Definition Classes
    Iterator

Deprecated Value Members

  1. def /:[B](z: B)(op: (B, IPBlock) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.10) Use foldLeft instead of /:

  2. def :\[B](z: B)(op: (IPBlock, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.10) Use foldRight instead of :\

Inherited from Iterator[IPBlock]

Inherited from TraversableOnce[IPBlock]

Inherited from GenTraversableOnce[IPBlock]

Inherited from AnyRef

Inherited from Any

Ungrouped