- java.lang.Object
- 
- org.mal_lang.langspec.io.LangReader
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable
 
 public final class LangReader extends Object implements Closeable Reads.marfiles intoLangobjects.- Since:
- 1.0.0
 
- 
- 
Constructor SummaryConstructors Constructor Description LangReader(InputStream in)Constructs a newLangReaderobject.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this stream and releases any system resources associated with it.Langread()Returns aLangobject that is represented in the input source.Langread(boolean readIcons, boolean readLicense)Returns aLangobject that is represented in the input source.
 
- 
- 
- 
Constructor Detail- 
LangReaderpublic LangReader(InputStream in) Constructs a newLangReaderobject.- Parameters:
- in- an input stream from which a- .marfile is to be read
- Throws:
- NullPointerException- if- inis- null
- Since:
- 1.0.0
 
 
- 
 - 
Method Detail- 
readpublic Lang read() throws IOException Returns aLangobject that is represented in the input source. This method needs to be called only once for a reader instance.- Returns:
- a Langobject
- Throws:
- IOException- if an I/O error occurs
- IllegalStateException- if- reador- closemethod is already called
- Since:
- 1.0.0
 
 - 
readpublic Lang read(boolean readIcons, boolean readLicense) throws IOException Returns aLangobject 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 Langobject
- Throws:
- IOException- if an I/O error occurs
- IllegalStateException- if- reador- closemethod is already called
- Since:
- 1.0.0
 
 - 
closepublic void close() throws IOExceptionCloses 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:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException- if an I/O error occurs
- Since:
- 1.0.0
 
 
- 
 
-