Package org.eclipse.xtext.ide.util
Class PositionReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.BufferedReader
-
- java.io.LineNumberReader
-
- org.eclipse.xtext.ide.util.PositionReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Readable
@Beta public class PositionReader extends java.io.LineNumberReaderA reader that can return aPositionon the current input string.
-
-
Constructor Summary
Constructors Constructor Description PositionReader(java.lang.String in)Create a new position reader, using the input string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.lsp4j.PositiongetPosition()voidmark(int readAheadLimit)intread()intread(char[] cbuf, int off, int len)voidreset()longskip(long n)
-
-
-
Method Detail
-
getPosition
public org.eclipse.lsp4j.Position getPosition()
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.LineNumberReader- Throws:
java.io.IOException
-
read
public int read(char[] cbuf, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.LineNumberReader- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.LineNumberReader- Throws:
java.io.IOException
-
mark
public void mark(int readAheadLimit) throws java.io.IOException- Overrides:
markin classjava.io.LineNumberReader- Throws:
java.io.IOException
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.LineNumberReader- Throws:
java.io.IOException
-
-