Class LangReader

    • Constructor Detail

      • LangReader

        public LangReader​(InputStream in)
        Constructs a new LangReader object.
        Parameters:
        in - an input stream from which a .mar file is to be read
        Throws:
        NullPointerException - if in is null
        Since:
        1.0.0
    • Method Detail

      • read

        public Lang read()
                  throws IOException
        Returns a Lang object that is represented in the input source. This method needs to be called only once for a reader instance.
        Returns:
        a Lang object
        Throws:
        IOException - if an I/O error occurs
        IllegalStateException - if read or close method is already called
        Since:
        1.0.0
      • read

        public Lang read​(boolean readIcons,
                         boolean readLicense)
                  throws IOException
        Returns a Lang object that is represented in the input source. This method needs to be called only once for a reader instance.
        Parameters:
        readIcons - whether icons should be read
        readLicense - whether license and notice should be read
        Returns:
        a Lang object
        Throws:
        IOException - if an I/O error occurs
        IllegalStateException - if read or close method is already called
        Since:
        1.0.0
      • close

        public void close()
                   throws IOException
        Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Throws:
        IOException - if an I/O error occurs
        Since:
        1.0.0