Class/Object

net.tixxit.delimited.parser

Input

Related Docs: object Input | package parser

Permalink

final class Input extends AnyRef

An immutable window into a stream of character data. The size of the window is determined by 2 methods: marked(pos) and append(chunk), which shrink and expand the window respectively. All positions used with Input are always relative to the entire stream, though only positions within the current window are valid at any given point in time.

The method marked returns a new Input which may drop all data before the marked position. Accessing data before the marked position in the returned Input is undefined and should be expected to fail in hilarious ways.

The method append is used to append new chunks of data from the stream onto the input. The Input returned by append will have all its data up-to mark removed.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Input
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def append(chunk: String, last: Boolean = false): Input

    Permalink

    Returns an Input with the chunk of data appended to the currently readable window.

    Returns an Input with the chunk of data appended to the currently readable window. If last is true, then the returned Input's isLast method returns true. Any data available in the current Input, but prior to this Input's mark will not be available in the returned Input.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def charAt(i: Long): Char

    Permalink

    Returns the character at the given position.

    Returns the character at the given position. This method will do some aggressive bounds checking.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val data: String

    Permalink

    the currently readable window into the stream

  9. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def finished: Input

    Permalink

    Returns a copy of this Input where isLast is true.

  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val isLast: Boolean

    Permalink

    true if this window covers the end of the stream

  17. def limit: Long

    Permalink

    Returns the index of the first position that cannot be read.

    Returns the index of the first position that cannot be read. If isLast is true, then this is the length of the stream.

  18. val mark: Long

    Permalink

    the position in the stream we are able to truncate data to

  19. def marked(pos: Long): Input

    Permalink

    Returns an Input whose mark is at the given position.

  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  23. val offset: Long

    Permalink

    the offset, in chars, of the start of data in the stream

  24. def substring(from: Long, until: Long): String

    Permalink

    Returns the substring between from (inclusive) and until (exclusive).

    Returns the substring between from (inclusive) and until (exclusive). It is expected that mark <= from <= until <= limit.

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def window: String

    Permalink

    Returns the character data between mark and limit.

    Returns the character data between mark and limit. This is equivalent to calling input.substring(input.mark, input.limit).

Inherited from AnyRef

Inherited from Any

Ungrouped