public class OffsetTrackingReader extends FilterReader
Reader that tracks offsets and allows mapping between offset and
line and column.in| Constructor and Description |
|---|
OffsetTrackingReader(Reader in) |
| Modifier and Type | Method and Description |
|---|---|
TextOffsetLocation |
offsetToLocation(int offset)
Resolve the
MutableTextOffsetLocation of a character offset. |
void |
offsetToLocation(int offset,
TextOffsetLocation target)
Resolve the
MutableTextOffsetLocation of a character offset and
store it in the given target. |
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
close, mark, markSupported, ready, reset, skippublic OffsetTrackingReader(Reader in)
public int read()
throws IOException
read in class FilterReaderIOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class FilterReaderIOExceptionpublic TextOffsetLocation offsetToLocation(int offset)
MutableTextOffsetLocation of a character offset.offset - public void offsetToLocation(int offset,
TextOffsetLocation target)
MutableTextOffsetLocation of a character offset and
store it in the given target.offset - target - Copyright © 2018. All rights reserved.