Class MappingReader
java.lang.Object
net.fabricmc.mappingio.MappingReader
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable MappingFormatdetectFormat(Reader reader) static @Nullable MappingFormatdetectFormat(Path path) getNamespaces(Reader reader) getNamespaces(Reader reader, MappingFormat format) getNamespaces(Path file) getNamespaces(Path file, MappingFormat format) static voidread(Reader reader, MappingFormat format, MappingVisitor visitor) Tries to read the reader's content using the passed format's mapping reader.static voidread(Reader reader, MappingVisitor visitor) Tries to detect the reader's content's format and read it.static voidread(Path path, MappingFormat format, MappingVisitor visitor) Tries to read the given path using the passed format's reader.static voidread(Path path, MappingVisitor visitor) Tries to detect the format of the given path and read it.
-
Method Details
-
detectFormat
- Throws:
IOException
-
detectFormat
- Throws:
IOException
-
getNamespaces
- Throws:
IOException
-
getNamespaces
- Throws:
IOException
-
getNamespaces
- Throws:
IOException
-
getNamespaces
- Throws:
IOException
-
read
Tries to detect the format of the given path and read it.- Parameters:
path- The path to read from. Can be a file or a directory.visitor- The receiving visitor.- Throws:
IOException- If the format can't be detected or reading fails.
-
read
Tries to read the given path using the passed format's reader.- Parameters:
path- The path to read from. Can be a file or a directory.format- The format to use. Has to match the path's format.visitor- The receiving visitor.- Throws:
IOException- If reading fails.
-
read
Tries to detect the reader's content's format and read it.- Parameters:
reader- The reader to read from.visitor- The receiving visitor.- Throws:
IOException- If the format can't be detected or reading fails.
-
read
public static void read(Reader reader, MappingFormat format, MappingVisitor visitor) throws IOException Tries to read the reader's content using the passed format's mapping reader.- Parameters:
reader- The reader to read from.format- The format to use. Has to match the reader's content's format.visitor- The receiving visitor.- Throws:
IOException- If reading fails.
-