Java Doc for UrlClassLoader.java in  » Test-Coverage » GroboUtils » net » sourceforge » groboutils » util » classes » v1 » jdk0 » 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 » Test Coverage » GroboUtils » net.sourceforge.groboutils.util.classes.v1.jdk0 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sourceforge.groboutils.util.classes.v1.jdk0.UrlClassLoader

UrlClassLoader
public class UrlClassLoader implements IUrlClassLoader,BytecodeSource(Code)
Class responsible for loading classes in a JDK 1.0+ version compatible way. Need to determine speed vs. size for caching Jar files that are loaded over the internet. For now, we cache stuff, in the hope that the flush() will be called.

If the URL is null, or if the bytecode for a class name is not found, then this will attempt to load the class from the system classloader.

NOTE: As of version 1.0.0, there is no longer a dependency upon net.sourceforge.groboutils.util.io.v1
author:
   Matt Albrecht groboclown@users.sourceforge.net
version:
   $Date: 2003/05/06 05:35:00 $
since:
   November 17, 2000 (GroboUtils Alpha 0.9.0)




Constructor Summary
public  UrlClassLoader()
    

Method Summary
protected  StringclassName2jarFileName(String className)
     Converts a class name to a file name.
protected  StringconvertUrl(String url)
     Converts the given string to a fully qualified URL.
protected  byte[]findZipEntry(String filename, ZipInputStream zis)
     Finds the entry of the given filename in the given input stream, and returns the entry as a byte array.
public  voidflush()
     Call to flush any cache stored in the interface.
protected  StringgetAbsoluteFilename(File f)
    
public  byte[]getBytecode(String classname)
    
protected  BytecodeSourcegetBytecodeSource(String url)
    
protected  booleanisJarURL(String url)
    
protected  StringjoinClassToUrl(String className, String url)
     Joins a classname to a URL.
public  ClassloadClass(String className, String url)
     Load the given class from the given URL.
protected  byte[]readByteStream(InputStream is)
     A re-implementation of net.groboclown.util.io.v1.ReadByteStream, to reduce the amount of inter-package dependencies.


Constructor Detail
UrlClassLoader
public UrlClassLoader()(Code)
Default constructor




Method Detail
className2jarFileName
protected String className2jarFileName(String className)(Code)
Converts a class name to a file name.



convertUrl
protected String convertUrl(String url)(Code)
Converts the given string to a fully qualified URL. If no scheme is given, then it is converted to a File scheme.



findZipEntry
protected byte[] findZipEntry(String filename, ZipInputStream zis)(Code)
Finds the entry of the given filename in the given input stream, and returns the entry as a byte array. If the entry wasn't found, then null is returned.



flush
public void flush()(Code)
Call to flush any cache stored in the interface. This allows for a class loader to cache results, and free up memory when it is not needed.



getAbsoluteFilename
protected String getAbsoluteFilename(File f)(Code)



getBytecode
public byte[] getBytecode(String classname)(Code)



getBytecodeSource
protected BytecodeSource getBytecodeSource(String url)(Code)



isJarURL
protected boolean isJarURL(String url)(Code)
true if the URL references a Jar-like file.



joinClassToUrl
protected String joinClassToUrl(String className, String url)(Code)
Joins a classname to a URL.



loadClass
public Class loadClass(String className, String url)(Code)
Load the given class from the given URL. If the URL is null, then it loads the class from the default class loader.
Parameters:
  className - the exact class name to load.
Parameters:
  url - the URL from which the class is loaded. If this isnull, then this loads the class from the default classloader. the loaded Class instance, or null if the class couldnot be found.



readByteStream
protected byte[] readByteStream(InputStream is) throws IOException(Code)
A re-implementation of net.groboclown.util.io.v1.ReadByteStream, to reduce the amount of inter-package dependencies.



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

w___ww_.__j__a_v__a2s__.__c_o___m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.