Java Doc for JRResourcesUtil.java in  » Report » jasperreports-2.0.1 » net » sf » jasperreports » engine » util » 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 » Report » jasperreports 2.0.1 » net.sf.jasperreports.engine.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.jasperreports.engine.util.JRResourcesUtil

JRResourcesUtil
public class JRResourcesUtil (Code)
Provides methods for resource resolution via class loaders or URL stream handlers.
author:
   Lucian Chirita (lucianc@users.sourceforge.net)
version:
   $Id: JRResourcesUtil.java 1229 2006-04-19 10:27:35Z teodord $




Method Summary
public static  URLcreateURL(String spec, URLStreamHandlerFactory urlHandlerFactory)
     Tries to parse a String as an URL.
public static  URLfindClassLoaderResource(String location, ClassLoader classLoader, Class clazz)
     Attempts to find a resource using a class loader.
public static  ClassLoadergetClassLoader(ClassLoader classLoader)
     Returns a class loader.
public static  ClassLoadergetGlobalClassLoader()
     Returns the global class loader.
public static  URLStreamHandlerFactorygetGlobalURLStreamHandlerFactory()
     Returns the global URL stream handler factory.
public static  ClassLoadergetThreadClassLoader()
     Returns the thread local class loader.
public static  URLStreamHandlerFactorygetThreadURLStreamHandlerFactory()
     Returns the thread local URL stream handler factory.
public static  URLStreamHandlergetURLHandler(String spec, URLStreamHandlerFactory urlHandlerFactory)
     Returns an URL stream handler for an URL specified as a String.
public static  URLStreamHandlerFactorygetURLHandlerFactory(URLStreamHandlerFactory urlHandlerFactory)
     Returns an URL steam handler factory.
public static  voidresetClassLoader()
     Resets the the thread local class loader to its previous value.
public static  voidresetThreadURLHandlerFactory()
     Resets the the thread local URL stream handler factory to its previous value.
public static  voidsetGlobalClassLoader(ClassLoader classLoader)
     Sets a global class loader to be used for resource resolution.
public static  voidsetGlobalURLHandlerFactory(URLStreamHandlerFactory urlHandlerFactory)
     Sets a global URL stream handler facotry to be used for resource resolution.
public static  voidsetThreadClassLoader(ClassLoader classLoader)
     Sets the thread local class loader.
public static  voidsetThreadURLHandlerFactory(URLStreamHandlerFactory urlHandlerFactory)
     Sets the thread local URL stream handler factory.



Method Detail
createURL
public static URL createURL(String spec, URLStreamHandlerFactory urlHandlerFactory)(Code)
Tries to parse a String as an URL.
Parameters:
  spec - the String to parse
Parameters:
  urlHandlerFactory - an URL stream handler factory to use an URL if the parsing is successful
See Also:   JRResourcesUtil.getURLHandler(String,URLStreamHandlerFactory)
See Also:   JRResourcesUtil.getURLHandlerFactory(URLStreamHandlerFactory)



findClassLoaderResource
public static URL findClassLoaderResource(String location, ClassLoader classLoader, Class clazz)(Code)
Attempts to find a resource using a class loader.

The following sources are tried:


Parameters:
  location - the resource name
Parameters:
  classLoader - a class loader
Parameters:
  clazz - a class the resource URL if found



getClassLoader
public static ClassLoader getClassLoader(ClassLoader classLoader)(Code)
Returns a class loader.

The first not null value from the following is returned:

  • the value of the parameter
  • the thread local class loader
  • the global class loader

Parameters:
  classLoader - a class loader that will be returned if not null a class loader.
See Also:   JRResourcesUtil.setGlobalClassLoader(ClassLoader)
See Also:   JRResourcesUtil.setThreadClassLoader(ClassLoader)



getGlobalClassLoader
public static ClassLoader getGlobalClassLoader()(Code)
Returns the global class loader. the global class loader.
See Also:   JRResourcesUtil.setGlobalClassLoader(ClassLoader)



getGlobalURLStreamHandlerFactory
public static URLStreamHandlerFactory getGlobalURLStreamHandlerFactory()(Code)
Returns the global URL stream handler factory. the global URL stream handler factory
See Also:   JRResourcesUtil.setGlobalURLHandlerFactory(URLStreamHandlerFactory)



getThreadClassLoader
public static ClassLoader getThreadClassLoader()(Code)
Returns the thread local class loader. the thread local class loader.
See Also:   JRResourcesUtil.setThreadClassLoader(ClassLoader)



getThreadURLStreamHandlerFactory
public static URLStreamHandlerFactory getThreadURLStreamHandlerFactory()(Code)
Returns the thread local URL stream handler factory. the thread local URL stream handler factory.
See Also:   JRResourcesUtil.setThreadURLHandlerFactory(URLStreamHandlerFactory)



getURLHandler
public static URLStreamHandler getURLHandler(String spec, URLStreamHandlerFactory urlHandlerFactory)(Code)
Returns an URL stream handler for an URL specified as a String.
Parameters:
  spec - the String to parse as an URL
Parameters:
  urlHandlerFactory - an URL stream handler factory an URL stream handler if one was found for the protocol of the URL
See Also:   JRResourcesUtil.getURLHandlerFactory(URLStreamHandlerFactory)



getURLHandlerFactory
public static URLStreamHandlerFactory getURLHandlerFactory(URLStreamHandlerFactory urlHandlerFactory)(Code)
Returns an URL steam handler factory.

The first not null value from the following is returned:

  • the value of the parameter
  • the thread local URL stream handler factory
  • the global URL stream handler factory

Parameters:
  urlHandlerFactory - an URL steam handler factory that will be returned if not null an URL steam handler factory
See Also:   JRResourcesUtil.setGlobalURLHandlerFactory(URLStreamHandlerFactory)
See Also:   JRResourcesUtil.setThreadURLHandlerFactory(URLStreamHandlerFactory)



resetClassLoader
public static void resetClassLoader()(Code)
Resets the the thread local class loader to its previous value.



resetThreadURLHandlerFactory
public static void resetThreadURLHandlerFactory()(Code)
Resets the the thread local URL stream handler factory to its previous value.



setGlobalClassLoader
public static void setGlobalClassLoader(ClassLoader classLoader)(Code)
Sets a global class loader to be used for resource resolution.
Parameters:
  classLoader - the class loader
See Also:   JRResourcesUtil.getClassLoader(ClassLoader)



setGlobalURLHandlerFactory
public static void setGlobalURLHandlerFactory(URLStreamHandlerFactory urlHandlerFactory)(Code)
Sets a global URL stream handler facotry to be used for resource resolution.
Parameters:
  urlHandlerFactory - the URL stream handler factory
See Also:   JRResourcesUtil.getURLHandlerFactory(URLStreamHandlerFactory)



setThreadClassLoader
public static void setThreadClassLoader(ClassLoader classLoader)(Code)
Sets the thread local class loader.
Parameters:
  classLoader - a class loader
See Also:   JRResourcesUtil.getClassLoader(ClassLoader)
See Also:   JRResourcesUtil.resetThreadURLHandlerFactory()



setThreadURLHandlerFactory
public static void setThreadURLHandlerFactory(URLStreamHandlerFactory urlHandlerFactory)(Code)
Sets the thread local URL stream handler factory.
Parameters:
  urlHandlerFactory - an URL stream handler factory.
See Also:   JRResourcesUtil.getURLHandlerFactory(URLStreamHandlerFactory)
See Also:   JRResourcesUtil.resetThreadURLHandlerFactory()



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)

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