public abstract class TextMappingsReader extends MappingsReader
MappingsReader
designed to aid
with the implementation of mapping readers for text-based
mapping formats.SrgReader
,
CSrgReader
,
TSrgReader
Modifier and Type | Class and Description |
---|---|
static class |
TextMappingsReader.Processor
A parser for a given mappings format.
|
Modifier and Type | Field and Description |
---|---|
protected Function<MappingSet,TextMappingsReader.Processor> |
processor |
protected BufferedReader |
reader |
Modifier | Constructor and Description |
---|---|
protected |
TextMappingsReader(Reader reader,
Function<MappingSet,TextMappingsReader.Processor> processor)
Creates a new mappings reader, for the given
Reader . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
MappingSet |
read(MappingSet mappings)
Reads mappings from the previously given
InputStream , to
the given MappingSet . |
read
protected final BufferedReader reader
protected final Function<MappingSet,TextMappingsReader.Processor> processor
protected TextMappingsReader(Reader reader, Function<MappingSet,TextMappingsReader.Processor> processor)
Reader
.reader
- The readerprocessor
- The line processor to use for reading the linespublic MappingSet read(MappingSet mappings)
MappingsReader
InputStream
, to
the given MappingSet
.read
in class MappingsReader
mappings
- The mapping setpublic void close() throws IOException
IOException