1 /* 2 * Copyright 2006 Werner Guttmann 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.exolab.castor.xml; 17 18 import org.castor.core.util.Messages; 19 20 /** 21 * Xerces-specific OutputFormat instance, used with JDK 5.0 only. 22 * 23 * @author <a href="mailto:werner DOT guttmann AT gmx DOT net">Werner Guttmann</a> 24 * @version $Revision: 6216 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $ 25 */ 26 public class XercesJDK5OutputFormat extends BaseXercesOutputFormat implements OutputFormat { 27 28 private static final String CLASS_NAME = "com.sun.org.apache.xml.internal.serialize.OutputFormat"; 29 30 /** 31 * Creates an instance of this class. 32 */ 33 public XercesJDK5OutputFormat() { 34 try { 35 _outputFormat = Class.forName(CLASS_NAME).newInstance(); 36 } catch (Exception except) { 37 throw new RuntimeException(Messages.format( 38 "conf.failedInstantiateOutputFormat", CLASS_NAME, except)); 39 } 40 } 41 42 }