Returns the permissions for the given codesource object. The implementation of this method first calls super.getPermissions and then adds permissions based on the URL of the codesource.
If the protocol of this URL is "jar", then the permission granted is based on the permission that is required by the URL of the Jar file.
If the protocol is "file" and there is an authority component, then permission to connect to and accept connections from that authority may be granted. If the protocol is "file" and the path specifies a file, then permission to read that file is granted. If protocol is "file" and the path is a directory, permission is granted to read all files and (recursively) all files and subdirectories contained in that directory.
If the protocol is not "file", then permission to connect to and accept connections from the URL's host is granted.