Class DefaultToolchainsReader

  • All Implemented Interfaces:
    ToolchainsReader

    @Named
    @Singleton
    public class DefaultToolchainsReader
    extends java.lang.Object
    implements ToolchainsReader
    Handles deserialization of toolchains from the default textual format.
    Since:
    3.3.0
    Author:
    Robert Scholte
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PersistedToolchains read​(java.io.File input, java.util.Map<java.lang.String,​?> options)
      Reads the toolchains from the specified file.
      PersistedToolchains read​(java.io.InputStream input, java.util.Map<java.lang.String,​?> options)
      Reads the toolchains from the specified byte stream.
      PersistedToolchains read​(java.io.Reader input, java.util.Map<java.lang.String,​?> options)
      Reads the toolchains from the specified character reader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultToolchainsReader

        public DefaultToolchainsReader()
    • Method Detail

      • read

        public PersistedToolchains read​(java.io.File input,
                                        java.util.Map<java.lang.String,​?> options)
                                 throws java.io.IOException
        Description copied from interface: ToolchainsReader
        Reads the toolchains from the specified file.
        Specified by:
        read in interface ToolchainsReader
        Parameters:
        input - The file to deserialize the toolchains from, must not be null.
        options - The options to use for deserialization, may be null to use the default values.
        Returns:
        The deserialized toolchains, never null.
        Throws:
        java.io.IOException - If the toolchains could not be deserialized.
        ToolchainsParseException - If the input format could not be parsed.
      • read

        public PersistedToolchains read​(java.io.Reader input,
                                        java.util.Map<java.lang.String,​?> options)
                                 throws java.io.IOException
        Description copied from interface: ToolchainsReader
        Reads the toolchains from the specified character reader. The reader will be automatically closed before the method returns.
        Specified by:
        read in interface ToolchainsReader
        Parameters:
        input - The reader to deserialize the toolchains from, must not be null.
        options - The options to use for deserialization, may be null to use the default values.
        Returns:
        The deserialized toolchains, never null.
        Throws:
        java.io.IOException - If the toolchains could not be deserialized.
        ToolchainsParseException - If the input format could not be parsed.
      • read

        public PersistedToolchains read​(java.io.InputStream input,
                                        java.util.Map<java.lang.String,​?> options)
                                 throws java.io.IOException
        Description copied from interface: ToolchainsReader
        Reads the toolchains from the specified byte stream. The stream will be automatically closed before the method returns.
        Specified by:
        read in interface ToolchainsReader
        Parameters:
        input - The stream to deserialize the toolchains from, must not be null.
        options - The options to use for deserialization, may be null to use the default values.
        Returns:
        The deserialized toolchains, never null.
        Throws:
        java.io.IOException - If the toolchains could not be deserialized.
        ToolchainsParseException - If the input format could not be parsed.