mascoptLib.io
Interface WriterInterface

All Known Implementing Classes:
GodWriter, MGLWriter, MGXWriter

public interface WriterInterface

The writer interface.


Method Summary
 void add(Object toWrite)
          Add an object to write in the file.
 void write()
          Write the file with all objects added in the Writer.
 

Method Detail

add

public void add(Object toWrite)
Add an object to write in the file. This method provides a simple way of write your objects in a file. When the Writer is created you just add your objects and it will be written when calling the write() function. The add may fail if the object you write is not recognize by the file format you use. It will be ignored.

Parameters:
toWrite - the object to write in the file.

write

public void write()
Write the file with all objects added in the Writer. This open, then write the file and close it. All recognized objects added with the add() method are written.