01: /*
02: * File: Common.java
03: * Project: jMOS, com.aranova.java.jmos.util
04: * Revision: 0.9.1
05: * Date: 20-ene-2006 12:01:02
06: *
07: * Copyright (C) Aragón Innovación Tecnológica S.L.L.
08: * All rights reserved.
09: *
10: * This software is distributed under the terms of the Aranova License version 1.0.
11: * See the terms of the Aranova License in the documentation provided with this software.
12: */
13:
14: package com.aranova.java.jmos.util;
15:
16: import javax.xml.parsers.SAXParserFactory;
17: import javax.xml.stream.XMLOutputFactory;
18:
19: /**
20: * Clase con variables estaticas comunes al proyecto.
21: *
22: * @author <a href="http://www.aranova.net/contactar/">Daniel Sánchez</a>
23: * @version 0.9.1
24: * @since 0.9.1
25: */
26: public class Common {
27: private static final XMLOutputFactory _outputFactory;
28: private static final SAXParserFactory _parserFactory;
29: private static final String _encoding;
30:
31: static {
32: _parserFactory = SAXParserFactory.newInstance();
33: _outputFactory = XMLOutputFactory.newInstance();
34: _encoding = Config.getConfig().getString("Encoding");
35: }
36:
37: /**
38: * @return Returns the encoding.
39: */
40: public static String getEncoding() {
41: return _encoding;
42: }
43:
44: /**
45: * @return Returns the outputFactory.
46: */
47: public static XMLOutputFactory getOutputFactory() {
48: return _outputFactory;
49: }
50:
51: /**
52: * @return Returns the parserFactory.
53: */
54: public static SAXParserFactory getParserFactory() {
55: return _parserFactory;
56: }
57: }
|