net.officefloor.demo.store
Class MacroStore

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

public class MacroStore
extends java.lang.Object

Store providing ability to store/retrieve Macro listings.

Author:
Daniel Sagenschneider

Constructor Summary
MacroStore()
           
 
Method Summary
 Macro[] retrieve(java.io.Reader reader)
          Retrieves the Macro listing from the Reader.
 void store(Macro[] macros, java.io.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,
                  java.io.Writer writer)
           throws java.io.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:
java.io.IOException - If fails to write Macro objects.

retrieve

public Macro[] retrieve(java.io.Reader reader)
                 throws java.io.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:
java.io.IOException - If fails to read content.
MacroRetrieveException - If fails to retrieve the stored Macro.


Copyright © 2005-2012. All Rights Reserved.