org.yaml.snakeyaml.reader
Class StreamReader

java.lang.Object
  extended by org.yaml.snakeyaml.reader.StreamReader

public class StreamReader
extends Object

Reader: checks if code points are in allowed range, adds '\0' to the end.


Constructor Summary
StreamReader(Reader reader)
           
StreamReader(String stream)
           
 
Method Summary
 void forward()
           
 void forward(int length)
          read the next length characters and move the pointer.
 int getColumn()
           
 Charset getEncoding()
           
 int getIndex()
           
 int getLine()
           
 Mark getMark()
           
static boolean isPrintable(int c)
           
static boolean isPrintable(String data)
           
 int peek()
           
 int peek(int index)
          Peek the next index-th code point
 String prefix(int length)
          peek the next length code points
 String prefixForward(int length)
          prefix(length) immediately followed by forward(length)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamReader

public StreamReader(String stream)

StreamReader

public StreamReader(Reader reader)
Method Detail

isPrintable

public static boolean isPrintable(String data)

isPrintable

public static boolean isPrintable(int c)

getMark

public Mark getMark()

forward

public void forward()

forward

public void forward(int length)
read the next length characters and move the pointer. if the last character is high surrogate one more character will be read

Parameters:
length - amount of characters to move forward

peek

public int peek()

peek

public int peek(int index)
Peek the next index-th code point

Parameters:
index - to peek
Returns:
the next index-th code point

prefix

public String prefix(int length)
peek the next length code points

Parameters:
length - amount of the characters to peek
Returns:
the next length code points

prefixForward

public String prefixForward(int length)
prefix(length) immediately followed by forward(length)

Parameters:
length - amount of characters to get
Returns:
the next length code points

getColumn

public int getColumn()

getEncoding

public Charset getEncoding()

getIndex

public int getIndex()

getLine

public int getLine()


Copyright © 2008–2017. All rights reserved.