class ByteArrayBasedParserInput extends DefaultParserInput
ParserInput reading directly off a byte array.
This avoids a separate decoding step but assumes that each byte represents exactly one character,
which is encoded by ISO-8859-1!
You can therefore use this ParserInput type only if you know that all input will be ISO-8859-1-encoded,
or only contains 7-bit ASCII characters (which is a subset of ISO-8859-1)!
Note that this ParserInput type will NOT work with general UTF-8-encoded input as this can contain
character representations spanning multiple bytes. However, if you know that your input will only ever contain
7-bit ASCII characters (0x00-0x7F) then UTF-8 is fine, since the first 127 UTF-8 characters are
encoded with only one byte that is identical to 7-bit ASCII and ISO-8859-1.
- Alphabetic
- By Inheritance
- ByteArrayBasedParserInput
- DefaultParserInput
- ParserInput
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ByteArrayBasedParserInput(bytes: Array[Byte], endIndex: Int = 0)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def charAt(ix: Int): Char
Returns the character at the given (zero-based) index.
Returns the character at the given (zero-based) index. Note: this method is hot and should be small and efficient. A range-check is not required for the parser to work correctly.
- Definition Classes
- ByteArrayBasedParserInput → ParserInput
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getLine(line: Int): String
Gets the input line with the given number as a String.
Gets the input line with the given number as a String. Note: the first line is line number one!
- Definition Classes
- DefaultParserInput → ParserInput
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val length: Int
The number of characters in this input.
The number of characters in this input. Note: this method is hot and should be small and efficient.
- Definition Classes
- ByteArrayBasedParserInput → ParserInput
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def sliceCharArray(start: Int, end: Int): Array[Char]
Returns the characters between index
start(inclusively) andend(exclusively) as anArray[Char].Returns the characters between index
start(inclusively) andend(exclusively) as anArray[Char].- Definition Classes
- ByteArrayBasedParserInput → ParserInput
- def sliceString(start: Int, end: Int): String
Returns the characters between index
start(inclusively) andend(exclusively) as aString.Returns the characters between index
start(inclusively) andend(exclusively) as aString.- Definition Classes
- ByteArrayBasedParserInput → ParserInput
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()