Class LangWriter

    • Constructor Detail

      • LangWriter

        public LangWriter​(OutputStream out)
        Constructs a new LangWriter object.
        Parameters:
        out - an output stream to which a .mar file is to be written
        Throws:
        NullPointerException - if out is null
        Since:
        1.0.0
    • Method Detail

      • write

        public void write​(Lang lang)
                   throws IOException
        Writes the specified Lang object to the output source. This method needs to be called only once for a writer instance.
        Parameters:
        lang - Lang object that is to be written to the output source
        Throws:
        NullPointerException - if lang is null
        IOException - if an I/O error occurs
        IllegalStateException - if write 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