@@ -0,0 +1,3131 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.xml.sax.helpers;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.InputStream;%0Aimport java.security.AccessController;%0Aimport java.security.PrivilegedAction;%0Aimport java.security.PrivilegedActionException;%0Aimport java.security.PrivilegedExceptionAction;%0A%0A/**%0A * This class is duplicated for each JAXP subpackage so keep it in sync.%0A * It is package private and therefore is not exposed as part of the JAXP%0A * API.%0A *%0A * Security related methods that only work on J2SE 1.2 and newer.%0A */%0Afinal class SecuritySupport %7B%0A    %0A    private SecuritySupport() %7B%7D%0A%0A    static ClassLoader getContextClassLoader() %7B%0A%09return (ClassLoader)%0A%09%09AccessController.doPrivileged(new PrivilegedAction() %7B%0A%09    public Object run() %7B%0A%09%09ClassLoader cl = null;%0A%09%09try %7B%0A%09%09    cl = Thread.currentThread().getContextClassLoader();%0A%09%09%7D catch (SecurityException ex) %7B %7D%0A%09%09return cl;%0A%09    %7D%0A%09%7D);%0A    %7D%0A%0A    static String getSystemProperty(final String propName) %7B%0A%09return (String)%0A            AccessController.doPrivileged(new PrivilegedAction() %7B%0A                public Object run() %7B%0A                    return System.getProperty(propName);%0A                %7D%0A            %7D);%0A    %7D%0A%0A    static FileInputStream getFileInputStream(final File file)%0A        throws FileNotFoundException%0A    %7B%0A%09try %7B%0A            return (FileInputStream)%0A                AccessController.doPrivileged(new PrivilegedExceptionAction() %7B%0A                    public Object run() throws FileNotFoundException %7B%0A                        return new FileInputStream(file);%0A                    %7D%0A                %7D);%0A%09%7D catch (PrivilegedActionException e) %7B%0A%09    throw (FileNotFoundException)e.getException();%0A%09%7D%0A    %7D%0A%0A    static InputStream getResourceAsStream(final ClassLoader cl,%0A                                           final String name)%0A    %7B%0A        return (InputStream)%0A            AccessController.doPrivileged(new PrivilegedAction() %7B%0A                public Object run() %7B%0A                    InputStream ris;%0A                    if (cl == null) %7B%0A                        ris = ClassLoader.getSystemResourceAsStream(name);%0A                    %7D else %7B%0A                        ris = cl.getResourceAsStream(name);%0A                    %7D%0A                    return ris;%0A                %7D%0A            %7D);%0A    %7D%0A%7D%0A

Add JAXP 1.4 API