 /*
 * Copyright (C) 11-sept.-2003  Jean-Yves Beaujean 
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,  59
 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 * 
 */
package jxtray.io;


import java.io.IOException ;

/**
 * @author Jean-Yves Beaujean
 *
 * This class is the mother class of the others WriterStategy classes.  
 *  All of the others WriterStrategy must be child of this classes. 
 *  This allows to have a unique object for multiples use cases.
 *  Design pattern : strategy ( of course... )
 *  Note that the child class MUST implement the write méthod. 
 */
public abstract class WriterStrategy 
{

		protected String _fileName = null;
		/** Return the writer name. It this case : default, cause this class will never be instanciated 
		 *  @return String
		 */
		public String getName() { return "Default Writer"; }
		
		protected abstract void open() throws IOException;
		protected abstract void close() throws IOException;
		protected abstract void write(String data) throws IOException;
}
