Original 2.4
[marc4j.git] / src / org / marc4j / MarcWriter.java
1 //$Id: MarcWriter.java,v 1.2 2006/07/30 10:14:56 bpeters Exp $\r
2 /**\r
3  * Copyright (C) 2004 Bas Peters\r
4  *\r
5  * This file is part of MARC4J\r
6  *\r
7  * MARC4J is free software; you can redistribute it and/or\r
8  * modify it under the terms of the GNU Lesser General Public \r
9  * License as published by the Free Software Foundation; either \r
10  * version 2.1 of the License, or (at your option) any later version.\r
11  *\r
12  * MARC4J is distributed in the hope that it will be useful,\r
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
15  * Lesser General Public License for more details.\r
16  *\r
17  * You should have received a copy of the GNU Lesser General Public \r
18  * License along with MARC4J; if not, write to the Free Software\r
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
20  */\r
21 package org.marc4j;\r
22 \r
23 import org.marc4j.converter.CharConverter;\r
24 import org.marc4j.marc.Record;\r
25 \r
26 /**\r
27  * Implement this interface to provide a writer for <code>Record</code>\r
28  * objects.\r
29  * \r
30  * <p>See the {@link org.marc4j.marc} package Javadoc for more information\r
31  * about the {@link org.marc4j.marc.Record} object model.</p>\r
32  * \r
33  * @author Bas Peters\r
34  * @version $Revision: 1.2 $\r
35  *  \r
36  */\r
37 public interface MarcWriter {\r
38 \r
39   /**\r
40    * Writes a single <code>Record</code> to the output stream.\r
41    * \r
42    * @param record\r
43    *          the Record object\r
44    */\r
45   public void write(Record record);\r
46 \r
47   /**\r
48    * Sets the character converter.\r
49    * \r
50    * @param converter\r
51    *          the character converter\r
52    */\r
53   public void setConverter(CharConverter converter);\r
54 \r
55   /**\r
56    * Returns the character converter.\r
57    * \r
58    * @return CharConverter the character converter\r
59    */\r
60   public CharConverter getConverter();\r
61 \r
62   /**\r
63    * Closes the writer.\r
64    *  \r
65    */\r
66   public void close();\r
67 \r
68 }