Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package apache
    Definition Classes
    org
  • package daffodil
    Definition Classes
    apache
  • package io
    Definition Classes
    daffodil
  • object DataInputStream

    This trait defines the low level API called by Daffodil's Parsers.

    This trait defines the low level API called by Daffodil's Parsers.

    It has features to support

    • backtracking
    • regex pattern matching using Java Pattern regexs (for lengthKind pattern and pattern asserts)
    • character-by-character access as needed by our DFA delimiter/escaping
    • very efficient access to small binary data (64-bits or smaller)
    • alignment and skipping
    • encodingErrorPolicy 'error' and 'replace'
    • convenient use of zero-based values because java/scala APIs for I/O are all zero-based
    • convenient use of 1-based values because DFDL is 1-based, so debug/trace and such all want to be 1-based values.

    A goal is that this API does not allocate objects as I/O operations are performed unless boxed objects are being returned. For example getSignedLong(...) should not allocate anything per call; however, getSignedBigInt(...) does, because a BigInt is a heap-allocated object.

    Internal buffers and such may be dropped/resized/reallocated as needed during method calls. The point is not that you never allocate. It's that the per-I/O operation overhead does not require object allocation for every data-accessing method call.

    Similarly, text data can be retrieved into a char buffer, and the char buffer can provide a limit on size (available capacity of the char buffer) in characters. The text can be examined in the char buffer, or a string can be created from the char buffer's contents when needed.

    This API is very stateful, and not-thread-safe i.e., each thread must have its own object. Some of this is inherent in this API style, and some is inherited from the underlying objects this API uses (such as CharsetDecoder).

    This API is also intended to support some very highly optimized implementations. For example, if the schemas is all text, and the encoding is known to be iso-8859-1, then there is no notion of a decode error, and every byte value, extended to a Char value, *is* the Unicode codepoint. No decoder needs to be used in this case and this API becomes a quite thin layer on top of a java.io.BufferedStream.

    Terminology:

    Available Data - this is the data that is between the current bit position, and some limit. The limit can either be set (via setBitLimit calls), or it can be limited by tunable values, or implementation-specific upper limits, or it can simply be the end of the data stream.

    Different kinds of DataInputStreams can have different limits. For example, a File-based DataInputStream may have no limit on the forward speculation distance, because the file can be randomly accessed if necessary. Contrasting that with a data stream that is directly connected to a network socket may have a upper limit on the amount of data that it is willing to buffer.

    None of this is a commitment that this API will in fact have multiple specialized implementations. It's just a possibility for the future.

    Implementation Note: It is the implementation of this interface which implements the Bucket Algorithm as described on the Daffodil Wiki. All of that bucket stuff is beneath this API.

    In general, this API tries to return a value rather than throw exceptions whenever the behavior may be very common. This leaves it up to the caller to decide whether or not to throw an exception, and avoids the overhead of try-catch blocks. The exception to this rule are the methods that involve character decoding for textual data. These methods may throw CharacterCodingException when the encoding error policy is 'error'.

    Definition Classes
    io
  • CharIterator
  • Mark
  • MarkPos
  • NotEnoughDataException

trait CharIterator extends Iterator[Char]

An Iterator[Char] with additional peek and peek2 methods.

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

Type Members

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

Abstract Value Members

  1. abstract def hasNext: Boolean
    Definition Classes
    Iterator
  2. abstract def next(): Char
    Definition Classes
    Iterator
  3. abstract def peek(): Char

    Looks ahead 1 into the data.

    Looks ahead 1 into the data. Returns -1.toChar if there is no character to peek to.

    This does not advance the position in the data stream.

  4. abstract def peek2(): Char

    Looks ahead 2 into the data.

    Looks ahead 2 into the data. Returns -1.toChar if there is no character to peek to.

    This does not advance the position in the data stream.

  5. abstract def reset(): Unit
  6. abstract def setFormatInfo(fi: FormatInfo): Unit

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++[B >: Char](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, Char) ⇒ B, combop: (B, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def buffered: BufferedIterator[Char]
    Definition Classes
    Iterator
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  12. def collect[B](pf: PartialFunction[Char, 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.

  13. def collectFirst[B](pf: PartialFunction[Char, B]): Option[B]
    Definition Classes
    TraversableOnce
  14. def contains(elem: Any): Boolean
    Definition Classes
    Iterator
  15. def copyToArray[B >: Char](xs: Array[B], start: Int, len: Int): Unit
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  16. def copyToArray[B >: Char](xs: Array[B]): Unit
    Definition Classes
    TraversableOnce → GenTraversableOnce
  17. def copyToArray[B >: Char](xs: Array[B], start: Int): Unit
    Definition Classes
    TraversableOnce → GenTraversableOnce
  18. def copyToBuffer[B >: Char](dest: Buffer[B]): Unit
    Definition Classes
    TraversableOnce
  19. def corresponds[B](that: GenTraversableOnce[B])(p: (Char, B) ⇒ Boolean): Boolean
    Definition Classes
    Iterator
  20. def count(p: (Char) ⇒ Boolean): Int
    Definition Classes
    TraversableOnce → GenTraversableOnce
  21. def drop(n: Int): Iterator[Char]
    Definition Classes
    Iterator
  22. def dropWhile(p: (Char) ⇒ Boolean): Iterator[Char]
    Definition Classes
    Iterator
  23. def duplicate: (Iterator[Char], Iterator[Char])
    Definition Classes
    Iterator
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  26. def exists(p: (Char) ⇒ Boolean): Boolean
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  27. def filter(p: (Char) ⇒ Boolean): Iterator[Char]
    Definition Classes
    Iterator
  28. def filterNot(p: (Char) ⇒ Boolean): Iterator[Char]
    Definition Classes
    Iterator
  29. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. def find(p: (Char) ⇒ Boolean): Option[Char]
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  31. def flatMap[B](f: (Char) ⇒ GenTraversableOnce[B]): Iterator[B]
    Definition Classes
    Iterator
  32. def fold[A1 >: Char](z: A1)(op: (A1, A1) ⇒ A1): A1
    Definition Classes
    TraversableOnce → GenTraversableOnce
  33. def foldLeft[B](z: B)(op: (B, Char) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  34. def foldRight[B](z: B)(op: (Char, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  35. def forall(p: (Char) ⇒ Boolean): Boolean
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  36. def foreach[U](f: (Char) ⇒ U): Unit
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  37. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  38. def grouped[B >: Char](size: Int): GroupedIterator[B]
    Definition Classes
    Iterator
  39. def hasDefiniteSize: Boolean
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  40. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  41. def indexOf[B >: Char](elem: B, from: Int): Int
    Definition Classes
    Iterator
  42. def indexOf[B >: Char](elem: B): Int
    Definition Classes
    Iterator
  43. def indexWhere(p: (Char) ⇒ Boolean, from: Int): Int
    Definition Classes
    Iterator
  44. def indexWhere(p: (Char) ⇒ Boolean): Int
    Definition Classes
    Iterator
  45. def isEmpty: Boolean
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  46. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  47. def isTraversableAgain: Boolean
    Definition Classes
    Iterator → GenTraversableOnce
  48. def length: Int
    Definition Classes
    Iterator
  49. def map[B](f: (Char) ⇒ B): Iterator[B]
    Definition Classes
    Iterator
  50. def max[B >: Char](implicit cmp: Ordering[B]): Char
    Definition Classes
    TraversableOnce → GenTraversableOnce
  51. def maxBy[B](f: (Char) ⇒ B)(implicit cmp: Ordering[B]): Char
    Definition Classes
    TraversableOnce → GenTraversableOnce
  52. def min[B >: Char](implicit cmp: Ordering[B]): Char
    Definition Classes
    TraversableOnce → GenTraversableOnce
  53. def minBy[B](f: (Char) ⇒ B)(implicit cmp: Ordering[B]): Char
    Definition Classes
    TraversableOnce → GenTraversableOnce
  54. def mkString: String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  55. def mkString(sep: String): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  56. def mkString(start: String, sep: String, end: String): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  57. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  58. def nonEmpty: Boolean
    Definition Classes
    TraversableOnce → GenTraversableOnce
  59. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  60. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  61. def padTo[A1 >: Char](len: Int, elem: A1): Iterator[A1]
    Definition Classes
    Iterator
  62. def partition(p: (Char) ⇒ Boolean): (Iterator[Char], Iterator[Char])
    Definition Classes
    Iterator
  63. def patch[B >: Char](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]
    Definition Classes
    Iterator
  64. def product[B >: Char](implicit num: Numeric[B]): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  65. def reduce[A1 >: Char](op: (A1, A1) ⇒ A1): A1
    Definition Classes
    TraversableOnce → GenTraversableOnce
  66. def reduceLeft[B >: Char](op: (B, Char) ⇒ B): B
    Definition Classes
    TraversableOnce
  67. def reduceLeftOption[B >: Char](op: (B, Char) ⇒ B): Option[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  68. def reduceOption[A1 >: Char](op: (A1, A1) ⇒ A1): Option[A1]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  69. def reduceRight[B >: Char](op: (Char, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  70. def reduceRightOption[B >: Char](op: (Char, B) ⇒ B): Option[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  71. def reversed: List[Char]
    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  72. def sameElements(that: Iterator[_]): Boolean
    Definition Classes
    Iterator
  73. def scanLeft[B](z: B)(op: (B, Char) ⇒ B): Iterator[B]
    Definition Classes
    Iterator
  74. def scanRight[B](z: B)(op: (Char, B) ⇒ B): Iterator[B]
    Definition Classes
    Iterator
  75. def seq: Iterator[Char]
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  76. def size: Int
    Definition Classes
    TraversableOnce → GenTraversableOnce
  77. def sizeHintIfCheap: Int
    Attributes
    protected[collection]
    Definition Classes
    GenTraversableOnce
  78. def slice(from: Int, until: Int): Iterator[Char]
    Definition Classes
    Iterator
  79. def sliceIterator(from: Int, until: Int): Iterator[Char]
    Attributes
    protected
    Definition Classes
    Iterator
  80. def sliding[B >: Char](size: Int, step: Int): GroupedIterator[B]
    Definition Classes
    Iterator
  81. def span(p: (Char) ⇒ Boolean): (Iterator[Char], Iterator[Char])
    Definition Classes
    Iterator
  82. def sum[B >: Char](implicit num: Numeric[B]): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  83. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  84. def take(n: Int): Iterator[Char]
    Definition Classes
    Iterator
  85. def takeWhile(p: (Char) ⇒ Boolean): Iterator[Char]
    Definition Classes
    Iterator
  86. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, Char, Col[Char]]): Col[Char]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  87. def toArray[B >: Char](implicit arg0: ClassTag[B]): Array[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  88. def toBuffer[B >: Char]: Buffer[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  89. def toIndexedSeq: IndexedSeq[Char]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  90. def toIterable: Iterable[Char]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  91. def toIterator: Iterator[Char]
    Definition Classes
    Iterator → GenTraversableOnce
  92. def toList: List[Char]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  93. def toMap[T, U](implicit ev: <:<[Char, (T, U)]): Map[T, U]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  94. def toSeq: Seq[Char]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  95. def toSet[B >: Char]: Set[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  96. def toStream: Stream[Char]
    Definition Classes
    Iterator → GenTraversableOnce
  97. def toString(): String
    Definition Classes
    Iterator → AnyRef → Any
  98. def toTraversable: Traversable[Char]
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  99. def toVector: Vector[Char]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  100. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  101. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  102. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  103. def withFilter(p: (Char) ⇒ Boolean): Iterator[Char]
    Definition Classes
    Iterator
  104. def zip[B](that: Iterator[B]): Iterator[(Char, B)]
    Definition Classes
    Iterator
  105. def zipAll[B, A1 >: Char, B1 >: B](that: Iterator[B], thisElem: A1, thatElem: B1): Iterator[(A1, B1)]
    Definition Classes
    Iterator
  106. def zipWithIndex: Iterator[(Char, Int)]
    Definition Classes
    Iterator

Deprecated Value Members

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

    (Since version 2.12.10) Use foldLeft instead of /:

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

    (Since version 2.12.10) Use foldRight instead of :\

Inherited from Iterator[Char]

Inherited from TraversableOnce[Char]

Inherited from GenTraversableOnce[Char]

Inherited from AnyRef

Inherited from Any

Ungrouped