net.officefloor.demo.store
Class MacroStore

java.lang.Object
  extended by net.officefloor.demo.store.MacroStore

public class MacroStore
extends Object

Store providing ability to store/retrieve Macro listings.

Author:
Daniel Sagenschneider

Constructor Summary
MacroStore()
           
 
Method Summary
 Macro[] retrieve(Reader reader)
          Retrieves the Macro listing from the Reader.
 void store(Macro[] macros, Writer writer)
          Stores the Macro into the Writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacroStore

public MacroStore()
Method Detail

store

public void store(Macro[] macros,
                  Writer writer)
           throws IOException
Stores the Macro into the Writer.

Parameters:
macros - Listing of Macro instances to be stored.
writer - Writer to receive the serialised content of the Macro objects.
Throws:
IOException - If fails to write Macro objects.

retrieve

public Macro[] retrieve(Reader reader)
                 throws IOException,
                        MacroRetrieveException
Retrieves the Macro listing from the Reader.

Parameters:
reader - Reader containing the serialised content of the Macro objects.
Returns:
Listing of Macro instances.
Throws:
IOException - If fails to read content.
MacroRetrieveException - If fails to retrieve the stored Macro.


Copyright © 2005-2012. All Rights Reserved.