Java Doc for URLClassLoader.java in  » Apache-Harmony-Java-SE » java-package » java » net » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.net 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.ClassLoader
      java.security.SecureClassLoader
         java.net.URLClassLoader

URLClassLoader
public class URLClassLoader extends SecureClassLoader (Code)
This class loader is responsible for loading classes and resources from a list of URLs which can refer to either directories or JAR files. Classes loaded by this URLClassLoader are granted permission to access the URLs contained in the URL search list.

Inner Class :static class SubURLClassLoader extends URLClassLoader
Inner Class :static class IndexFile
Inner Class :class URLHandler
Inner Class :class URLJarHandler extends URLHandler
Inner Class :class URLFileHandler extends URLHandler

Field Summary
 ArrayList<URLHandler>handlerList
    
 Map<URL, URLHandler>handlerMap
    
 ArrayList<URL>originalUrls
    
 List<URL>searchList
    

Constructor Summary
public  URLClassLoader(URL[] urls)
     Constructs a new instance of this class.
public  URLClassLoader(URL[] urls, ClassLoader parent)
     Constructs a new instance of this class.
public  URLClassLoader(URL[] searchUrls, ClassLoader parent, URLStreamHandlerFactory factory)
     Constructs a new instance of this class.

Method Summary
protected  voidaddURL(URL url)
     Adds the specified URL to the search list.
protected  PackagedefinePackage(String packageName, Manifest manifest, URL url)
     Define a new Package using information extracted from the specified Manifest.
protected  ClassfindClass(String clsName)
     Locates and loads the specified class, searching this URLClassLoader's list of URLS.
Parameters:
  clsName - String the name of the class.
 ClassfindClassImpl(String className)
    
public  URLfindResource(String name)
     Answers a URL referencing the specified resource or null if no resource could be found.
 URLfindResourceImpl(String resName)
     Answers a URL among the given ones referencing the specified resource or null if no resource could be found.
public  Enumeration<URL>findResources(String name)
     Answers an enumeration of URLs that contain the specified resource.
 voidfindResourcesImpl(String name, ArrayList<URL> result)
    
 URLHandlergetHandler(int num)
    
protected  PermissionCollectiongetPermissions(CodeSource codesource)
     Answers the permissions for the given code source.
public  URL[]getURLs()
    
public static  URLClassLoadernewInstance(URL[] urls)
     Answers an instance of URLClassLoader.
public static  URLClassLoadernewInstance(URL[] urls, ClassLoader parentCl)
     Answers an instance of URLClassLoader.

Field Detail
handlerList
ArrayList<URLHandler> handlerList(Code)



handlerMap
Map<URL, URLHandler> handlerMap(Code)



originalUrls
ArrayList<URL> originalUrls(Code)



searchList
List<URL> searchList(Code)




Constructor Detail
URLClassLoader
public URLClassLoader(URL[] urls)(Code)
Constructs a new instance of this class. The newly created instance will have the system ClassLoader as its parent. URLs that end with "/" are assumed to be directories, otherwise they are assumed to be Jar files.
Parameters:
  urls - the URLs to search
throws:
  SecurityException - if a security manager exists and its checkCreateClassLoadermethod doesn't allow creation of new ClassLoaders



URLClassLoader
public URLClassLoader(URL[] urls, ClassLoader parent)(Code)
Constructs a new instance of this class. The newly created instance will have the specified ClassLoader as its parent. URLs that end with "/" are assumed to be directories, otherwise they are assumed to be Jar files.
Parameters:
  urls - the URLs to search
Parameters:
  parent - the ClassLoader to assign as this loader's parent.
throws:
  SecurityException - if a security manager exists and its checkCreateClassLoadermethod doesn't allow creation of new ClassLoaders



URLClassLoader
public URLClassLoader(URL[] searchUrls, ClassLoader parent, URLStreamHandlerFactory factory)(Code)
Constructs a new instance of this class. The newly created instance will have the specified ClassLoader as its parent and use the specified factory to create stream handlers. URLs that end with "/" are assumed to be directories, otherwise they are assumed to be Jar files.
Parameters:
  searchUrls - java.net.URL[] the URLs that will be searched in the orderthey were specified for resource
Parameters:
  parent - ClassLoader the ClassLoader name of the resource to find.
Parameters:
  factory - java.net.URLStreamHandlerFactory the factory that will used tocreate stream (protocol) handlers
throws:
  SecurityException - if a security manager exists and its checkCreateClassLoadermethod doesn't allow creation of new ClassLoaders




Method Detail
addURL
protected void addURL(URL url)(Code)
Adds the specified URL to the search list.
Parameters:
  url - java.net.URL the new URL



definePackage
protected Package definePackage(String packageName, Manifest manifest, URL url) throws IllegalArgumentException(Code)
Define a new Package using information extracted from the specified Manifest.
Parameters:
  packageName - The name of the package
Parameters:
  manifest - The Manifest for the Package
Parameters:
  url - The code source for the Package The Package created
throws:
  IllegalArgumentException - if the Package already exists



findClass
protected Class findClass(String clsName) throws ClassNotFoundException(Code)
Locates and loads the specified class, searching this URLClassLoader's list of URLS.
Parameters:
  clsName - String the name of the class. Class the class that has been loaded.
throws:
  java.lang.ClassNotFoundException - if the class cannot be loaded



findClassImpl
Class findClassImpl(String className)(Code)



findResource
public URL findResource(String name)(Code)
Answers a URL referencing the specified resource or null if no resource could be found.
Parameters:
  name - java.lang.String the name of the requested resource URL URL for the resource.



findResourceImpl
URL findResourceImpl(String resName)(Code)
Answers a URL among the given ones referencing the specified resource or null if no resource could be found.
Parameters:
  resName - java.lang.String the name of the requested resource URL URL for the resource.



findResources
public Enumeration<URL> findResources(String name) throws IOException(Code)
Answers an enumeration of URLs that contain the specified resource.
Parameters:
  name - java.lang.String the name of the requested resource Enumeration the enumeration of URLs that contain the specifiedresource.
throws:
  IOException - thrown if an IO Exception occurs while attempting to connect



findResourcesImpl
void findResourcesImpl(String name, ArrayList<URL> result)(Code)



getHandler
URLHandler getHandler(int num)(Code)



getPermissions
protected PermissionCollection getPermissions(CodeSource codesource)(Code)
Answers the permissions for the given code source. First this method retrieves the permissions from the system policy. If the protocol is "file:/" then a new permission, FilePermission, granting the read permission to the file is added to the permission collection. Otherwise, connecting to and accepting connections from the URL is granted.
Parameters:
  codesource - CodeSource PermissionCollection



getURLs
public URL[] getURLs()(Code)
Answers the search list of this URLClassLoader java.net.URL[]



newInstance
public static URLClassLoader newInstance(URL[] urls)(Code)
Answers an instance of URLClassLoader. loadClass() of the new instance will call the SecurityManager's checkPackageAccess() before loading a class.
Parameters:
  urls - java.net.URL[] a list of URLs that is passed to the newURLClassloader java.net.URLClassLoader the new instance ofURLClassLoader



newInstance
public static URLClassLoader newInstance(URL[] urls, ClassLoader parentCl)(Code)
Answers an instance of URLClassLoader. loadClass() of the new instance will call security manager's checkPackageAccess() before loading a class.
Parameters:
  urls - URL[] the list of URLs that is passed to the newURLClassloader
Parameters:
  parentCl - ClassLoader the parent class loader that is passed tothe new URLClassloader URLClassLoader the new instance of URLClassLoader



Methods inherited from java.security.SecureClassLoader
final protected Class defineClass(String name, byte[] b, int off, int len, CodeSource cs)(Code)(Java Doc)
final protected Class defineClass(String name, ByteBuffer b, CodeSource cs)(Code)(Java Doc)
protected PermissionCollection getPermissions(CodeSource codesource)(Code)(Java Doc)

Methods inherited from java.lang.ClassLoader
public void clearAssertionStatus()(Code)(Java Doc)
final protected Class defineClass(byte[] data, int offset, int len) throws ClassFormatError(Code)(Java Doc)
final protected Class defineClass(String name, byte[] data, int offset, int len) throws ClassFormatError(Code)(Java Doc)
final protected Class defineClass(String name, ByteBuffer b, ProtectionDomain protectionDomain) throws ClassFormatError(Code)(Java Doc)
final protected synchronized Class defineClass(String name, byte[] data, int offset, int len, ProtectionDomain domain) throws ClassFormatError(Code)(Java Doc)
protected Package definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) throws IllegalArgumentException(Code)(Java Doc)
protected Class findClass(String name) throws ClassNotFoundException(Code)(Java Doc)
protected String findLibrary(String name)(Code)(Java Doc)
final native protected Class findLoadedClass(String name)(Code)(Java Doc)
protected URL findResource(String name)(Code)(Java Doc)
protected Enumeration<URL> findResources(String name) throws IOException(Code)(Java Doc)
final protected Class findSystemClass(String name) throws ClassNotFoundException(Code)(Java Doc)
protected Package getPackage(String name)(Code)(Java Doc)
protected Package[] getPackages()(Code)(Java Doc)
final public ClassLoader getParent()(Code)(Java Doc)
public URL getResource(String name)(Code)(Java Doc)
public InputStream getResourceAsStream(String name)(Code)(Java Doc)
public Enumeration<URL> getResources(String name) throws IOException(Code)(Java Doc)
public static ClassLoader getSystemClassLoader()(Code)(Java Doc)
public static URL getSystemResource(String name)(Code)(Java Doc)
public static InputStream getSystemResourceAsStream(String name)(Code)(Java Doc)
public static Enumeration<URL> getSystemResources(String name) throws IOException(Code)(Java Doc)
public Class loadClass(String name) throws ClassNotFoundException(Code)(Java Doc)
protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException(Code)(Java Doc)
final protected void resolveClass(Class clazz)(Code)(Java Doc)
public void setClassAssertionStatus(String name, boolean flag)(Code)(Java Doc)
public void setDefaultAssertionStatus(boolean flag)(Code)(Java Doc)
public void setPackageAssertionStatus(String name, boolean flag)(Code)(Java Doc)
final protected void setSigners(Class clazz, Object[] signers)(Code)(Java Doc)

Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.