Class/Object

org.cert.netsa.io.silk

IPSetReader

Related Docs: object IPSetReader | package silk

Permalink

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)

    Permalink
    Attributes
    protected

Type Members

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

    Permalink
    Definition Classes
    Iterator

Abstract Value Members

  1. abstract def containsIPv6: Boolean

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++[B >: IPBlock](that: ⇒ GenTraversableOnce[B]): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  4. def /:[B](z: B)(op: (B, IPBlock) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  5. def :\[B](z: B)(op: (IPBlock, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. def addString(b: StringBuilder): StringBuilder

    Permalink
    Definition Classes
    TraversableOnce
  8. def addString(b: StringBuilder, sep: String): StringBuilder

    Permalink
    Definition Classes
    TraversableOnce
  9. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Permalink
    Definition Classes
    TraversableOnce
  10. def aggregate[B](z: ⇒ B)(seqop: (B, IPBlock) ⇒ B, combop: (B, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. val bitmap256Length: Int

    Permalink

    Octet-length of the 256-Bitmap

    Octet-length of the 256-Bitmap

    Attributes
    protected
  13. var bufOffset: Int

    Permalink

    Current position (octet offset) in the current buffer.

    Current position (octet offset) in the current buffer.

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

    Permalink

    Current buffer of bytes being processed

    Current buffer of bytes being processed

    Attributes
    protected[this]
  15. def buffered: BufferedIterator[IPBlock]

    Permalink
    Definition Classes
    Iterator
  16. def checkAvailable(avail: Int): Boolean

    Permalink

    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]
  17. val cidrBitmapFollows: Int

    Permalink

    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
  18. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. def collect[B](pf: PartialFunction[IPBlock, B]): Iterator[B]

    Permalink
    Definition Classes
    Iterator
    Annotations
    @migration
    Migration

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

  20. def collectFirst[B](pf: PartialFunction[IPBlock, B]): Option[B]

    Permalink
    Definition Classes
    TraversableOnce
  21. def contains(elem: Any): Boolean

    Permalink
    Definition Classes
    Iterator
  22. def copyToArray[B >: IPBlock](xs: Array[B], start: Int, len: Int): Unit

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  23. def copyToArray[B >: IPBlock](xs: Array[B]): Unit

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  24. def copyToArray[B >: IPBlock](xs: Array[B], start: Int): Unit

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  25. def copyToBuffer[B >: IPBlock](dest: Buffer[B]): Unit

    Permalink
    Definition Classes
    TraversableOnce
  26. def corresponds[B](that: GenTraversableOnce[B])(p: (IPBlock, B) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    Iterator
  27. def count(p: (IPBlock) ⇒ Boolean): Int

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  28. def drop(n: Int): Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator
  29. def dropWhile(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator
  30. def duplicate: (Iterator[IPBlock], Iterator[IPBlock])

    Permalink
    Definition Classes
    Iterator
  31. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  33. def exists(p: (IPBlock) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  34. def filter(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator
  35. def filterNot(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator
  36. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  37. def find(p: (IPBlock) ⇒ Boolean): Option[IPBlock]

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  38. def flatMap[B](f: (IPBlock) ⇒ GenTraversableOnce[B]): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  39. def fold[A1 >: IPBlock](z: A1)(op: (A1, A1) ⇒ A1): A1

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  40. def foldLeft[B](z: B)(op: (B, IPBlock) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  41. def foldRight[B](z: B)(op: (IPBlock, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  42. def forall(p: (IPBlock) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  43. def foreach[U](f: (IPBlock) ⇒ U): Unit

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  44. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  45. def grouped[B >: IPBlock](size: Int): GroupedIterator[B]

    Permalink
    Definition Classes
    Iterator
  46. def handleBitmap256(buffer: Array[Byte], offset: Int, swap: Boolean): List[List[Int]]

    Permalink

    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]
  47. def hasDefiniteSize: Boolean

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  48. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  49. val header: Header

    Permalink
    Attributes
    protected[this]
  50. def indexOf[B >: IPBlock](elem: B): Int

    Permalink
    Definition Classes
    Iterator
  51. def indexWhere(p: (IPBlock) ⇒ Boolean): Int

    Permalink
    Definition Classes
    Iterator
  52. def isEmpty: Boolean

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  53. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  54. def isTraversableAgain: Boolean

    Permalink
    Definition Classes
    Iterator → GenTraversableOnce
  55. def lenToCidrV4(c: Int): Int

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    Iterator
  58. def map[B](f: (IPBlock) ⇒ B): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  59. def max[B >: IPBlock](implicit cmp: Ordering[B]): IPBlock

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  60. def maxBy[B](f: (IPBlock) ⇒ B)(implicit cmp: Ordering[B]): IPBlock

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  61. def min[B >: IPBlock](implicit cmp: Ordering[B]): IPBlock

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  62. def minBy[B](f: (IPBlock) ⇒ B)(implicit cmp: Ordering[B]): IPBlock

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  63. def mkString: String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  64. def mkString(sep: String): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  65. def mkString(start: String, sep: String, end: String): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  66. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  67. def nonEmpty: Boolean

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  68. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  69. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  70. def padTo[A1 >: IPBlock](len: Int, elem: A1): Iterator[A1]

    Permalink
    Definition Classes
    Iterator
  71. def partition(p: (IPBlock) ⇒ Boolean): (Iterator[IPBlock], Iterator[IPBlock])

    Permalink
    Definition Classes
    Iterator
  72. def patch[B >: IPBlock](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  73. def product[B >: IPBlock](implicit num: Numeric[B]): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  74. val reader: BufferReader

    Permalink
    Attributes
    protected[this]
  75. def reduce[A1 >: IPBlock](op: (A1, A1) ⇒ A1): A1

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  76. def reduceLeft[B >: IPBlock](op: (B, IPBlock) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce
  77. def reduceLeftOption[B >: IPBlock](op: (B, IPBlock) ⇒ B): Option[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  78. def reduceOption[A1 >: IPBlock](op: (A1, A1) ⇒ A1): Option[A1]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  79. def reduceRight[B >: IPBlock](op: (IPBlock, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  80. def reduceRightOption[B >: IPBlock](op: (IPBlock, B) ⇒ B): Option[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  81. def reversed: List[IPBlock]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  82. def sameElements(that: Iterator[_]): Boolean

    Permalink
    Definition Classes
    Iterator
  83. def scanLeft[B](z: B)(op: (B, IPBlock) ⇒ B): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  84. def scanRight[B](z: B)(op: (IPBlock, B) ⇒ B): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  85. def seq: Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  86. def size: Int

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  87. def skipBytes(skipLen: Int): Unit

    Permalink

    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]
  88. def slice(from: Int, until: Int): Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator
  89. def sliding[B >: IPBlock](size: Int, step: Int): GroupedIterator[B]

    Permalink
    Definition Classes
    Iterator
  90. def span(p: (IPBlock) ⇒ Boolean): (Iterator[IPBlock], Iterator[IPBlock])

    Permalink
    Definition Classes
    Iterator
  91. def sum[B >: IPBlock](implicit num: Numeric[B]): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  92. val swap: Boolean

    Permalink

    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]
  93. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  94. def take(n: Int): Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator
  95. def takeWhile(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator
  96. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, IPBlock, Col[IPBlock]]): Col[IPBlock]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  97. def toArray[B >: IPBlock](implicit arg0: ClassTag[B]): Array[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  98. def toBuffer[B >: IPBlock]: Buffer[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  99. def toIndexedSeq: IndexedSeq[IPBlock]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  100. def toIterable: Iterable[IPBlock]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  101. def toIterator: Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator → GenTraversableOnce
  102. def toList: List[IPBlock]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  103. def toMap[T, U](implicit ev: <:<[IPBlock, (T, U)]): Map[T, U]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  104. def toSeq: Seq[IPBlock]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  105. def toSet[B >: IPBlock]: Set[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  106. def toStream: Stream[IPBlock]

    Permalink
    Definition Classes
    Iterator → GenTraversableOnce
  107. def toString(): String

    Permalink
    Definition Classes
    Iterator → AnyRef → Any
  108. def toTraversable: Traversable[IPBlock]

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  109. def toVector: Vector[IPBlock]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  110. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  111. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  112. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  113. def withFilter(p: (IPBlock) ⇒ Boolean): Iterator[IPBlock]

    Permalink
    Definition Classes
    Iterator
  114. def zip[B](that: Iterator[B]): Iterator[(IPBlock, B)]

    Permalink
    Definition Classes
    Iterator
  115. def zipAll[B, A1 >: IPBlock, B1 >: B](that: Iterator[B], thisElem: A1, thatElem: B1): Iterator[(A1, B1)]

    Permalink
    Definition Classes
    Iterator
  116. def zipWithIndex: Iterator[(IPBlock, Int)]

    Permalink
    Definition Classes
    Iterator

Inherited from Iterator[IPBlock]

Inherited from TraversableOnce[IPBlock]

Inherited from GenTraversableOnce[IPBlock]

Inherited from AnyRef

Inherited from Any

Ungrouped