bundles/org.apache.jasper.glassfish/src/org/apache/jasper/servlet/JasperLoader.java
private byte[] loadClassDataFromFile(final String fileName) {
        byte[] classBytes = null;
        try {
            InputStream in = null;

            if (SecurityUtil.isPackageProtectionEnabled()){
                in = AccessController.doPrivileged(
                        new PrivilegedAction<InputStream>(){
                            public InputStream run(){
                                return getResourceAsStream(fileName);
                            }
                     });
            } else {
                in = getResourceAsStream(fileName);
            }

            if (in == null) {
                return null;
            }

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            byte buf[] = new byte[1024];
            for (int i = 0; (i = in.read(buf)) != -1; ) {
                baos.write(buf, 0, i);
            }
            in.close();
            baos.close();
            classBytes = baos.toByteArray();
        } catch(Exception ex) {
            ex.printStackTrace();
            return null;
        }
        return classBytes;
    }
private byte[] loadClassDataFromFile(final String fileName) {
        byte[] classBytes = null;
        try {
            InputStream in = null;

            if (SecurityUtil.isPackageProtectionEnabled()){
                in = AccessController.doPrivileged(
                        new PrivilegedAction<InputStream>(){
                            public InputStream run(){
                                return getResourceAsStream(fileName);
                            }
                     });
            } else {
                in = getResourceAsStream(fileName);
            }

            if (in == null) {
                return null;
            }

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            byte buf[] = new byte[1024];
            for (int i = 0; (i = in.read(buf)) != -1; ) {
                baos.write(buf, 0, i);
            }
            in.close();
            baos.close();
            classBytes = baos.toByteArray();
        } catch(Exception ex) {
            ex.printStackTrace();
            return null;
        }
        return classBytes;
    }
/*
Load JSP class data from file.