/** * Returns the permission, in this case the subclass, FilePermission object * which represents the permission necessary for this URLConnection to * establish the connection. * * @return the permission required for this URLConnection. * * @throws IOException * thrown when an IO exception occurs while creating the * permission. */ @Override public Permission getPermission() throws IOException { return jarFileURLConnection.getPermission(); }
String binaryPath = (new URL(Shaj.class.getProtectionDomain() .getCodeSource().getLocation(), ".")).openConnection() .getPermission().getName(); binaryPath = (new File(binaryPath)).getCanonicalPath();
/** * Returns an File representing the given resource or NULL if this * is not possible. */ public File getFile() throws IOException { // Try the permission hack if (checkConnection()) { Permission perm = _connection.getPermission(); if (perm instanceof java.io.FilePermission) return new File(perm.getName()); } // Try the URL file arg try {return new File(_url.getFile());} catch(Exception e) {Log.ignore(e);} // Don't know the file return null; }
Permission perm = _connection.getPermission(); _file = new File(perm==null?url.getFile():perm.getName());
Permission perm = connection.getPermission(); file = new File(perm==null?url.getFile():perm.getName());
@Override public Permission getPermission() throws IOException { return _conn.getPermission(); }
@Override public Permission getPermission() throws IOException { return wrappedJarUrlConnection.getPermission(); }
/** * Returns a {@code Permission} object representing the permissions needed * to access the content. * * @return * a {@code Permission} object representing the permissions needed to access * the content. * @throws IOException */ public Permission getPermission() throws IOException { return connection.getPermission(); }
public Permission getPermission() throws IOException { return delegateConnection.getPermission(); }
@Override public Permission getPermission() throws IOException { return wrappedJarUrlConnection.getPermission(); }
public Permission getPermission() throws IOException { return connection.getPermission(); }
/** * Returns the permission, in this case the subclass, FilePermission object * which represents the permission necessary for this URLConnection to * establish the connection. * * @return the permission required for this URLConnection. * * @throws IOException * thrown when an IO exception occurs while creating the * permission. */ @Override public Permission getPermission() throws IOException { return jarFileURLConnection.getPermission(); }
/** * Returns the permission, in this case the subclass, FilePermission object * which represents the permission necessary for this URLConnection to * establish the connection. * * @return the permission required for this URLConnection. * * @throws IOException * thrown when an IO exception occurs while creating the * permission. */ @Override public Permission getPermission() throws IOException { return jarFileURLConnection.getPermission(); }
/** * Returns the permission, in this case the subclass, FilePermission object * which represents the permission necessary for this URLConnection to * establish the connection. * * @return the permission required for this URLConnection. * * @throws IOException * thrown when an IO exception occurs while creating the * permission. */ @Override public Permission getPermission() throws IOException { return jarFileURLConnection.getPermission(); }
/** * Returns the permission, in this case the subclass, FilePermission object * which represents the permission necessary for this URLConnection to * establish the connection. * * @return the permission required for this URLConnection. * * @throws IOException * thrown when an IO exception occurs while creating the * permission. */ @Override public Permission getPermission() throws IOException { return jarFileURLConnection.getPermission(); }
/** * Returns the permission, in this case the subclass, FilePermission object * which represents the permission necessary for this URLConnection to * establish the connection. * * @return the permission required for this URLConnection. * * @throws IOException * thrown when an IO exception occurs while creating the * permission. */ @Override public Permission getPermission() throws IOException { return jarFileURLConnection.getPermission(); }
public Permission getPermission() throws IOException { URL jarFileUrl = new File(jarFile.getName()).toURL(); return jarFileUrl.openConnection().getPermission(); }
@Override public Permission getPermission() throws IOException { URL jarFileUrl = new File(jarFile.getName()).toURI().toURL(); return jarFileUrl.openConnection().getPermission(); }
public Permission getPermission() throws IOException { URL jarFileUrl = new File(jarFile.getName()).toURI().toURL(); return jarFileUrl.openConnection().getPermission(); }
public URLDecodingImageSource(URL url){ SecurityManager security = System.getSecurityManager(); if (security != null) { security.checkConnect(url.getHost(), url.getPort()); try { Permission p = url.openConnection().getPermission(); security.checkPermission(p); } catch (IOException e) { } } this.url = url; }