Interface MappingFormat

    • Method Detail

      • createReader

        MappingsReader createReader​(java.io.InputStream stream)
                             throws java.io.IOException
        Creates a MappingsReader from the given InputStream for the mapping format.
        Parameters:
        stream - The input stream
        Returns:
        The mapping reader
        Throws:
        java.io.IOException - Should an I/O issue occur
        java.lang.UnsupportedOperationException - If the format does not support reading
      • createReader

        default MappingsReader createReader​(java.nio.file.Path path)
                                     throws java.io.IOException
        Creates a MappingsReader for the given mappings file Path for the mapping format.
        Parameters:
        path - The path to the mappings file
        Returns:
        The mapping reader
        Throws:
        java.io.IOException - Should an I/O issue occur
        java.lang.UnsupportedOperationException - If the format does not support reading
      • read

        default MappingSet read​(MappingSet mappings,
                                java.nio.file.Path path)
                         throws java.io.IOException
        Reads a mappings file into the given MappingSet.
        Parameters:
        mappings - The mapping set to read in to
        path - The path of the mappings file
        Returns:
        The mappings
        Throws:
        java.io.IOException - Should an I/O issue occur
      • read

        default MappingSet read​(java.nio.file.Path path)
                         throws java.io.IOException
        Reads a mappings file into a MappingSet.
        Parameters:
        path - The path of the mappings file
        Returns:
        The mappings
        Throws:
        java.io.IOException - Should an I/O issue occur
      • createWriter

        MappingsWriter createWriter​(java.io.OutputStream stream)
                             throws java.io.IOException
        Creates a MappingsWriter from the given OutputStream for the mapping format.
        Parameters:
        stream - The output stream
        Returns:
        The mapping writer
        Throws:
        java.io.IOException - Should an I/O issue occur
        java.lang.UnsupportedOperationException - If the format does not support writing
      • createWriter

        default MappingsWriter createWriter​(java.nio.file.Path path)
                                     throws java.io.IOException
        Creates a MappingsWriter for the given mappings file Path for the mapping format.
        Parameters:
        path - The path to the mappings file
        Returns:
        The mapping writer
        Throws:
        java.io.IOException - Should an I/O issue occur
        java.lang.UnsupportedOperationException - If the format does not support writing
      • write

        default void write​(MappingSet mappings,
                           java.nio.file.Path path)
                    throws java.io.IOException
        Writes a mapping set to file.
        Parameters:
        mappings - The mapping set to write
        path - The path of the mappings file
        Throws:
        java.io.IOException - Should an I/O issue occur
      • write

        default void write​(MappingSet mappings,
                           java.nio.file.Path path,
                           MappingsWriterConfig config)
                    throws java.io.IOException
        Writes a mapping set to file, applying the given writer configuration before writing.
        Parameters:
        mappings - The mapping set to write
        path - The path of the mappings file
        config - The writer configuration
        Throws:
        java.io.IOException - Should an I/O issue occur
        Since:
        0.5.5
      • getStandardFileExtension

        java.util.Optional<java.lang.String> getStandardFileExtension()
        Gets the typically used file extension for the format, if available.
        Returns:
        The standard file extension