Java Doc for Resource.java in  » Sevlet-Container » jetty-modules » org » mortbay » resource » 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 » Sevlet Container » jetty modules » org.mortbay.resource 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mortbay.resource.Resource

All known Subclasses:   org.mortbay.resource.URLResource,
Resource
abstract public class Resource implements Serializable(Code)
Abstract resource class.
author:
   Nuno Pregui�a
author:
   Greg Wilkins (gregw)


Field Summary
public static  boolean__defaultUseCaches
    
 Object_associate
    


Method Summary
abstract public  ResourceaddPath(String path)
     Returns the resource contained inside the current resource with the given name.
Parameters:
  path - The path segment to add, which should be encoded by theencode method.
abstract public  booleandelete()
    
public  Stringencode(String uri)
     Encode according to this resource type.
abstract public  booleanexists()
     Returns true if the respresened resource exists.
protected  voidfinalize()
    
public  URLgetAlias()
    
public  ObjectgetAssociate()
    
public static  booleangetDefaultUseCaches()
    
abstract public  FilegetFile()
     Returns an File representing the given resource or NULL if this is not possible.
abstract public  InputStreamgetInputStream()
    
public  StringgetListHTML(String base, boolean parent)
     Get the resource list as a HTML directory listing.
abstract public  StringgetName()
    
abstract public  OutputStreamgetOutputStream()
    
abstract public  URLgetURL()
    
abstract public  booleanisDirectory()
     Returns true if the respresenetd resource is a container/directory.
abstract public  longlastModified()
    
abstract public  longlength()
    
abstract public  String[]list()
     Returns a list of resource names contained in the given resource The resource names are not URL encoded.
public static  ResourcenewClassPathResource(String resource)
     Find a classpath resource.
public static  ResourcenewClassPathResource(String name, boolean useCaches, boolean checkParents)
     Find a classpath resource. The method is used to lookup the resource.
public static  ResourcenewResource(URL url)
     Construct a resource from a url.
Parameters:
  url - A URL.
public static  ResourcenewResource(URL url, boolean useCaches)
     Construct a resource from a url.
public static  ResourcenewResource(String resource)
     Construct a resource from a string.
Parameters:
  resource - A URL or filename.
public static  ResourcenewResource(String resource, boolean useCaches)
     Construct a resource from a string.
public static  ResourcenewSystemResource(String resource)
     Construct a system resource from a string.
abstract public  voidrelease()
     Release any resources held by the resource.
abstract public  booleanrenameTo(Resource dest)
    
public  voidsetAssociate(Object o)
    
public static  voidsetDefaultUseCaches(boolean useCaches)
     Change the default setting for url connection caches.
public  voidwriteTo(OutputStream out, long start, long count)
    

Field Detail
__defaultUseCaches
public static boolean __defaultUseCaches(Code)



_associate
Object _associate(Code)





Method Detail
addPath
abstract public Resource addPath(String path) throws IOException, MalformedURLException(Code)
Returns the resource contained inside the current resource with the given name.
Parameters:
  path - The path segment to add, which should be encoded by theencode method.



delete
abstract public boolean delete() throws SecurityException(Code)
Deletes the given resource



encode
public String encode(String uri)(Code)
Encode according to this resource type. The default implementation calls URI.encodePath(uri)
Parameters:
  uri - String encoded for this resource type.



exists
abstract public boolean exists()(Code)
Returns true if the respresened resource exists.



finalize
protected void finalize()(Code)



getAlias
public URL getAlias()(Code)
The canonical Alias of this resource or null if none.



getAssociate
public Object getAssociate()(Code)



getDefaultUseCaches
public static boolean getDefaultUseCaches()(Code)



getFile
abstract public File getFile() throws IOException(Code)
Returns an File representing the given resource or NULL if this is not possible.



getInputStream
abstract public InputStream getInputStream() throws java.io.IOException(Code)
Returns an input stream to the resource



getListHTML
public String getListHTML(String base, boolean parent) throws IOException(Code)
Get the resource list as a HTML directory listing.
Parameters:
  base - The base URL
Parameters:
  parent - True if the parent directory should be included String of HTML



getName
abstract public String getName()(Code)
Returns the name of the resource



getOutputStream
abstract public OutputStream getOutputStream() throws java.io.IOException, SecurityException(Code)
Returns an output stream to the resource



getURL
abstract public URL getURL()(Code)
Returns an URL representing the given resource



isDirectory
abstract public boolean isDirectory()(Code)
Returns true if the respresenetd resource is a container/directory. If the resource is not a file, resources ending with "/" are considered directories.



lastModified
abstract public long lastModified()(Code)
Returns the last modified time



length
abstract public long length()(Code)
Return the length of the resource



list
abstract public String[] list()(Code)
Returns a list of resource names contained in the given resource The resource names are not URL encoded.



newClassPathResource
public static Resource newClassPathResource(String resource)(Code)
Find a classpath resource.



newClassPathResource
public static Resource newClassPathResource(String name, boolean useCaches, boolean checkParents)(Code)
Find a classpath resource. The method is used to lookup the resource. If it is not found, then the Loader.getResource(ClassStringboolean) method is used. If it is still not found, then ClassLoader.getSystemResource(String) is used. Unlike Resource.getSystemResource this method does not check for normal resources.
Parameters:
  name - The relative name of the resouce
Parameters:
  useCaches - True if URL caches are to be used.
Parameters:
  checkParents - True if forced searching of parent classloaders is performed to work around loaders with inverted priorities Resource or null



newResource
public static Resource newResource(URL url) throws IOException(Code)
Construct a resource from a url.
Parameters:
  url - A URL. A Resource object.



newResource
public static Resource newResource(URL url, boolean useCaches)(Code)
Construct a resource from a url.
Parameters:
  url - the url for which to make the resource
Parameters:
  useCaches - true enables URLConnection caching if applicable to the type of resource



newResource
public static Resource newResource(String resource) throws MalformedURLException, IOException(Code)
Construct a resource from a string.
Parameters:
  resource - A URL or filename. A Resource object.



newResource
public static Resource newResource(String resource, boolean useCaches) throws MalformedURLException, IOException(Code)
Construct a resource from a string.
Parameters:
  resource - A URL or filename.
Parameters:
  useCaches - controls URLConnection caching A Resource object.



newSystemResource
public static Resource newSystemResource(String resource) throws IOException(Code)
Construct a system resource from a string. The resource is tried as classloader resource before being treated as a normal resource.



release
abstract public void release()(Code)
Release any resources held by the resource.



renameTo
abstract public boolean renameTo(Resource dest) throws SecurityException(Code)
Rename the given resource



setAssociate
public void setAssociate(Object o)(Code)



setDefaultUseCaches
public static void setDefaultUseCaches(boolean useCaches)(Code)
Change the default setting for url connection caches. Subsequent URLConnections will use this default.
Parameters:
  useCaches -



writeTo
public void writeTo(OutputStream out, long start, long count) throws IOException(Code)

Parameters:
  out -
Parameters:
  start - First byte to write
Parameters:
  count - Bytes to write or -1 for all of them.



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.