public interface MappingFormat
| Modifier and Type | Method and Description |
|---|---|
MappingsReader |
createReader(InputStream stream)
Creates a
MappingsReader from the given InputStream
for the mapping format. |
default MappingsReader |
createReader(Path path)
Creates a
MappingsReader for the given mappings file Path
for the mapping format. |
MappingsWriter |
createWriter(OutputStream stream)
Creates a
MappingsWriter from the given OutputStream
for the mapping format. |
default MappingsWriter |
createWriter(Path path)
Creates a
MappingsWriter for the given mappings file Path
for the mapping format. |
Optional<String> |
getStandardFileExtension()
Gets the typically used file extension for the format, if available.
|
default MappingSet |
read(MappingSet mappings,
Path path)
Reads a mappings file into the given
MappingSet. |
default MappingSet |
read(Path path)
Reads a mappings file into a
MappingSet. |
default void |
write(MappingSet mappings,
Path path)
Writes a mapping set to file.
|
MappingsReader createReader(InputStream stream) throws IOException
MappingsReader from the given InputStream
for the mapping format.stream - The input streamIOException - Should an I/O issue occurUnsupportedOperationException - If the format does not support readingdefault MappingsReader createReader(Path path) throws IOException
MappingsReader for the given mappings file Path
for the mapping format.path - The path to the mappings fileIOException - Should an I/O issue occurUnsupportedOperationException - If the format does not support readingdefault MappingSet read(MappingSet mappings, Path path) throws IOException
MappingSet.mappings - The mapping set to read in topath - The path of the mappings fileIOException - Should an I/O issue occurdefault MappingSet read(Path path) throws IOException
MappingSet.path - The path of the mappings fileIOException - Should an I/O issue occurMappingsWriter createWriter(OutputStream stream) throws IOException
MappingsWriter from the given OutputStream
for the mapping format.stream - The output streamIOException - Should an I/O issue occurUnsupportedOperationException - If the format does not support writingdefault MappingsWriter createWriter(Path path) throws IOException
MappingsWriter for the given mappings file Path
for the mapping format.path - The path to the mappings fileIOException - Should an I/O issue occurUnsupportedOperationException - If the format does not support writingdefault void write(MappingSet mappings, Path path) throws IOException
mappings - The mapping set to writepath - The path of the mappings fileIOException - Should an I/O issue occur