933 // IOException also covers MalformedURLException
934 // SecurityException means some untrusted applet
935
936 // Fall through...
937 }
938 return new byte[0];
939 }
940
941 public static Stylesheet loadStylesheet(final String fname) {
942 try {
943 return loadStylesheetUnPrivileged(fname);
944 } catch (java.security.AccessControlException ace) {
945
946 // FIXME: JIGSAW -- we no longer are in a jar file, so this code path
947 // is obsolete and needs to be redone or eliminated. Fortunately, I
948 // don't think it is actually needed.
949 System.err.println("WARNING: security exception trying to load: " + fname);
950
951 /*
952 ** we got an access control exception, so
953 ** we could be running from an applet/jnlp/or with a security manager.
954 ** we'll allow the app to read a css file from our runtime jar,
955 ** and give it one more chance.
956 */
957
958 /*
959 ** check that there are enough chars after the !/ to have a valid .css or .bss file name
960 */
961 if ((fname.length() < 7) && (fname.indexOf("!/") < fname.length()-7)) {
962 return null;
963 }
964
965 /*
966 **
967 ** first check that it's actually looking for the same runtime jar
968 ** that we're running from, and not some other file.
969 */
970 try {
971 URI requestedFileUrI = new URI(fname);
972
973 /*
|
933 // IOException also covers MalformedURLException
934 // SecurityException means some untrusted applet
935
936 // Fall through...
937 }
938 return new byte[0];
939 }
940
941 public static Stylesheet loadStylesheet(final String fname) {
942 try {
943 return loadStylesheetUnPrivileged(fname);
944 } catch (java.security.AccessControlException ace) {
945
946 // FIXME: JIGSAW -- we no longer are in a jar file, so this code path
947 // is obsolete and needs to be redone or eliminated. Fortunately, I
948 // don't think it is actually needed.
949 System.err.println("WARNING: security exception trying to load: " + fname);
950
951 /*
952 ** we got an access control exception, so
953 ** we could be running with a security manager.
954 ** we'll allow the app to read a css file from our runtime jar,
955 ** and give it one more chance.
956 */
957
958 /*
959 ** check that there are enough chars after the !/ to have a valid .css or .bss file name
960 */
961 if ((fname.length() < 7) && (fname.indexOf("!/") < fname.length()-7)) {
962 return null;
963 }
964
965 /*
966 **
967 ** first check that it's actually looking for the same runtime jar
968 ** that we're running from, and not some other file.
969 */
970 try {
971 URI requestedFileUrI = new URI(fname);
972
973 /*
|