Statistics
| Revision:

root / trunk / libraries / libGPE-GML / src / org / gvsig / gpe / xml / writer / GPEXmlWriterHandler.java @ 11158

History | View | Annotate | Download (2.18 KB)

1
package org.gvsig.gpe.xml.writer;
2

    
3
import java.io.File;
4
import java.io.FileNotFoundException;
5
import java.io.FileWriter;
6
import java.io.IOException;
7
import java.io.InputStream;
8
import java.io.OutputStream;
9
import java.io.Writer;
10

    
11
import org.gvsig.gpe.writer.GPEWriterHandler;
12

    
13
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14
 *
15
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
16
 *
17
 * This program is free software; you can redistribute it and/or
18
 * modify it under the terms of the GNU General Public License
19
 * as published by the Free Software Foundation; either version 2
20
 * of the License, or (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
30
 *
31
 * For more information, contact:
32
 *
33
 *  Generalitat Valenciana
34
 *   Conselleria d'Infraestructures i Transport
35
 *   Av. Blasco Ib??ez, 50
36
 *   46010 VALENCIA
37
 *   SPAIN
38
 *
39
 *      +34 963862235
40
 *   gvsig@gva.es
41
 *      www.gvsig.gva.es
42
 *
43
 *    or
44
 *
45
 *   IVER T.I. S.A
46
 *   Salamanca 50
47
 *   46005 Valencia
48
 *   Spain
49
 *
50
 *   +34 963163400
51
 *   dac@iver.es
52
 */
53
/* CVS MESSAGES:
54
 *
55
 * $Id: GPEXmlWriterHandler.java 11158 2007-04-12 10:23:41Z jorpiell $
56
 * $Log$
57
 * Revision 1.1  2007-04-12 10:23:41  jorpiell
58
 * Add some writers and the GPEXml parser
59
 *
60
 *
61
 */
62
/**
63
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
64
 */
65
public abstract class GPEXmlWriterHandler extends GPEWriterHandler {
66
        private Writer writer = null;
67
        
68
        public GPEXmlWriterHandler(String format, File file) throws IOException {
69
                super(format, file);
70
                writer = createWriter();
71
        }
72
 
73
        /**
74
         * Creates an input stream from a file. 
75
         * @param file
76
         * @return
77
         * @throws FileNotFoundException 
78
         * @throws FileNotFoundException 
79
         */
80
        protected abstract Writer createWriter() throws IOException;
81
        
82
        /**
83
         * @return the outputStream
84
         */
85
        protected Writer getWriter() {
86
                return writer;
87
        }
88
        
89
}