Java Doc for HttpPath.java in  » EJB-Server-resin-3.1.5 » util » com » caucho » vfs » 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 » EJB Server resin 3.1.5 » util » com.caucho.vfs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.vfs.Path
      com.caucho.vfs.FilesystemPath
         com.caucho.vfs.HttpPath

All known Subclasses:   com.caucho.vfs.HttpsPath,
HttpPath
public class HttpPath extends FilesystemPath (Code)
The HTTP scheme. Currently it supports GET and POST.

TODO: support WEBDAV, enabling the full Path API.


Inner Class :static class CacheEntry
Inner Class :static class ListHandler extends org.xml.sax.helpers.DefaultHandler

Field Summary
protected static  L10NL
    
protected static  LruCache<String, CacheEntry>_cache
    
protected  CacheEntry_cacheEntry
    
protected  String_host
    
protected  int_port
    
protected  String_query
    
protected  String_virtualHost
    

Constructor Summary
public  HttpPath(String host, int port)
     Creates a new HTTP root path with a host and a port.
 HttpPath(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query)
     Creates a new HTTP sub path.

Method Summary
protected  PathcacheCopy()
    
public  booleancanRead()
     Returns true if the file is readable.
protected  HttpPathcreate(String host, int port)
    
protected  HttpPathcreate(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query)
    
public  booleanequals(Object o)
     Overrides equals to test for equality with an HTTP path.
public  booleanexists()
     Returns true if the file exists.
public  PathfsWalk(String userPath, Map<String, Object> attributes, String uri)
     Scans the path portion of the URI, i.e.
protected  CacheEntrygetCache()
    
public  StringgetHost()
     Returns the host part of the url.
public  longgetLastModified()
     Returns the last modified time.
public  longgetLength()
    
public  intgetPort()
     Returns the port part of the url.
public  StringgetQuery()
     Returns the query string.
public  StringgetScheme()
     Returns the scheme, http.
public  StringgetURL()
     Returns a full URL for the path.
public  StringgetUserPath()
     Returns the user's path.
public  StringgetVirtualHost()
     Returns the virtual host, if any.
public  inthashCode()
     Returns a hashCode for the path.
public  booleanisDirectory()
     Returns the last modified time.
public  booleanisFile()
     Returns true if the file exists.
public  PathlookupImpl(String userPath, Map<String, Object> newAttributes)
     Overrides the default lookup to parse the host and port before parsing the path.
public  StreamImplopenReadImpl()
     Returns a read stream for a GET request.
public  StreamImplopenReadWriteImpl()
     Returns a read/write pair for a POST request.
protected  PathschemeWalk(String userPath, Map<String, Object> attributes, String uri, int offset)
     Walk down the path starting from the portion immediately following the scheme.
public  StringtoString()
     Returns the string form of the http path.

Field Detail
L
protected static L10N L(Code)



_cache
protected static LruCache<String, CacheEntry> _cache(Code)



_cacheEntry
protected CacheEntry _cacheEntry(Code)



_host
protected String _host(Code)



_port
protected int _port(Code)



_query
protected String _query(Code)



_virtualHost
protected String _virtualHost(Code)




Constructor Detail
HttpPath
public HttpPath(String host, int port)(Code)
Creates a new HTTP root path with a host and a port.
Parameters:
  host - the target host
Parameters:
  port - the target port, if zero, uses port 80.



HttpPath
HttpPath(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query)(Code)
Creates a new HTTP sub path.
Parameters:
  root - the HTTP filesystem root
Parameters:
  userPath - the argument to the calling lookup()
Parameters:
  newAttributes - any attributes passed to http
Parameters:
  path - the full normalized path
Parameters:
  query - any query string




Method Detail
cacheCopy
protected Path cacheCopy()(Code)



canRead
public boolean canRead()(Code)
Returns true if the file is readable.



create
protected HttpPath create(String host, int port)(Code)



create
protected HttpPath create(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query)(Code)



equals
public boolean equals(Object o)(Code)
Overrides equals to test for equality with an HTTP path.



exists
public boolean exists()(Code)
Returns true if the file exists.



fsWalk
public Path fsWalk(String userPath, Map<String, Object> attributes, String uri)(Code)
Scans the path portion of the URI, i.e. everything after the host and port.
Parameters:
  userPath - the user's supplied path
Parameters:
  attributes - the attributes for the new path
Parameters:
  uri - the full uri for the new path. the found path.



getCache
protected CacheEntry getCache()(Code)
The contents of this directory or null if the path does notrefer to a directory.



getHost
public String getHost()(Code)
Returns the host part of the url.



getLastModified
public long getLastModified()(Code)
Returns the last modified time.



getLength
public long getLength()(Code)
Returns the file's length



getPort
public int getPort()(Code)
Returns the port part of the url.



getQuery
public String getQuery()(Code)
Returns the query string.



getScheme
public String getScheme()(Code)
Returns the scheme, http.



getURL
public String getURL()(Code)
Returns a full URL for the path.



getUserPath
public String getUserPath()(Code)
Returns the user's path.



getVirtualHost
public String getVirtualHost()(Code)
Returns the virtual host, if any.



hashCode
public int hashCode()(Code)
Returns a hashCode for the path.



isDirectory
public boolean isDirectory()(Code)
Returns the last modified time.



isFile
public boolean isFile()(Code)
Returns true if the file exists.



lookupImpl
public Path lookupImpl(String userPath, Map<String, Object> newAttributes)(Code)
Overrides the default lookup to parse the host and port before parsing the path.
Parameters:
  userPath - the path passed in by the user
Parameters:
  newAttributes - attributes passed by the user the final path.



openReadImpl
public StreamImpl openReadImpl() throws IOException(Code)
Returns a read stream for a GET request.



openReadWriteImpl
public StreamImpl openReadWriteImpl() throws IOException(Code)
Returns a read/write pair for a POST request.



schemeWalk
protected Path schemeWalk(String userPath, Map<String, Object> attributes, String uri, int offset)(Code)
Walk down the path starting from the portion immediately following the scheme. i.e. schemeWalk is responsible for parsing the host and port from the URL.
Parameters:
  userPath - the user's passed in path
Parameters:
  attributes - the attributes for the new path
Parameters:
  uri - the normalized full uri
Parameters:
  offset - offset into the uri to start processing, i.e. after thescheme. the looked-up path.



toString
public String toString()(Code)
Returns the string form of the http path.



Fields inherited from com.caucho.vfs.FilesystemPath
protected BindPath _bindRoot(Code)(Java Doc)
protected String _pathname(Code)(Java Doc)
protected FilesystemPath _root(Code)(Java Doc)
protected String _userPath(Code)(Java Doc)

Methods inherited from com.caucho.vfs.FilesystemPath
public void bind(Path context)(Code)(Java Doc)
public Path createRoot(SchemeMap schemeMap)(Code)(Java Doc)
public boolean equals(Object b)(Code)(Java Doc)
abstract public Path fsWalk(String userPath, Map<String, Object> newAttributes, String newPath)(Code)(Java Doc)
public String getFullPath()(Code)(Java Doc)
public Path getParent()(Code)(Java Doc)
public String getPath()(Code)(Java Doc)
public FilesystemPath getRoot()(Code)(Java Doc)
public String getTail()(Code)(Java Doc)
public String getUserPath()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
protected static String normalizePath(String oldPath, String newPath, int offset, char separatorChar)(Code)(Java Doc)
protected static void normalizePath(CharBuffer cb, String oldPath, String newPath, int offset, char separatorChar)(Code)(Java Doc)
protected Path schemeWalk(String userPath, Map<String, Object> attributes, String filePath, int offset)(Code)(Java Doc)
public void setUserPath(String path)(Code)(Java Doc)

Fields inherited from com.caucho.vfs.Path
final protected static L10N L(Code)(Java Doc)
protected static char _pathSeparatorChar(Code)(Java Doc)
protected SchemeMap _schemeMap(Code)(Java Doc)
protected static char _separatorChar(Code)(Java Doc)
static long _startTime(Code)(Java Doc)

Methods inherited from com.caucho.vfs.Path
public void bind(Path context)(Code)(Java Doc)
protected Path cacheCopy()(Code)(Java Doc)
public boolean canExecute()(Code)(Java Doc)
public boolean canRead()(Code)(Java Doc)
public boolean canWrite()(Code)(Java Doc)
public boolean changeGroup(int gid) throws IOException(Code)(Java Doc)
public boolean changeGroup(String groupName) throws IOException(Code)(Java Doc)
public boolean changeOwner(int uid) throws IOException(Code)(Java Doc)
public boolean changeOwner(String ownerName) throws IOException(Code)(Java Doc)
public boolean chmod(int value)(Code)(Java Doc)
protected Path copy()(Code)(Java Doc)
public PersistentDependency createDepend()(Code)(Java Doc)
public boolean createLink(Path target, boolean hardLink) throws IOException(Code)(Java Doc)
public boolean createNewFile() throws IOException(Code)(Java Doc)
public Path createRoot()(Code)(Java Doc)
public Path createRoot(SchemeMap schemeMap)(Code)(Java Doc)
public Path createTempFile(String prefix, String suffix) throws IOException(Code)(Java Doc)
public boolean equals(Object o)(Code)(Java Doc)
protected static String escapeURL(String rawURL)(Code)(Java Doc)
public boolean exists()(Code)(Java Doc)
public Object getAttribute(String name) throws IOException(Code)(Java Doc)
public Iterator getAttributeNames() throws IOException(Code)(Java Doc)
public long getBlockCount()(Code)(Java Doc)
public long getBlockSize()(Code)(Java Doc)
public Certificate[] getCertificates()(Code)(Java Doc)
public String getContentType()(Code)(Java Doc)
public long getCrc64()(Code)(Java Doc)
public long getCreateTime()(Code)(Java Doc)
public long getDevice()(Code)(Java Doc)
public long getDeviceId()(Code)(Java Doc)
public long getDiskSpaceFree()(Code)(Java Doc)
public long getDiskSpaceTotal()(Code)(Java Doc)
final public static char getFileSeparatorChar()(Code)(Java Doc)
public String getFullPath()(Code)(Java Doc)
public int getGroup()(Code)(Java Doc)
public String getHost()(Code)(Java Doc)
public long getInode()(Code)(Java Doc)
public long getLastAccessTime()(Code)(Java Doc)
public long getLastModified()(Code)(Java Doc)
public long getLastStatusChangeTime()(Code)(Java Doc)
public long getLength()(Code)(Java Doc)
public int getMode()(Code)(Java Doc)
public String getNativePath()(Code)(Java Doc)
public static String getNewlineString()(Code)(Java Doc)
public int getNumberOfLinks()(Code)(Java Doc)
public Object getObject() throws IOException(Code)(Java Doc)
public int getOwner()(Code)(Java Doc)
public Path getParent()(Code)(Java Doc)
abstract public String getPath()(Code)(Java Doc)
final public static char getPathSeparatorChar()(Code)(Java Doc)
public int getPort()(Code)(Java Doc)
public String getQuery()(Code)(Java Doc)
public String getRelativePath()(Code)(Java Doc)
public ArrayList<Path> getResources(String name)(Code)(Java Doc)
public ArrayList<Path> getResources()(Code)(Java Doc)
abstract public String getScheme()(Code)(Java Doc)
final protected static char getSeparatorChar()(Code)(Java Doc)
public String getTail()(Code)(Java Doc)
public String getURL()(Code)(Java Doc)
public int getUser()(Code)(Java Doc)
protected static String getUserDir()(Code)(Java Doc)
public String getUserPath()(Code)(Java Doc)
public Object getValue() throws Exception(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isBlockDevice()(Code)(Java Doc)
public boolean isCharacterDevice()(Code)(Java Doc)
public boolean isDirectory()(Code)(Java Doc)
public boolean isExecutable()(Code)(Java Doc)
public boolean isFIFO()(Code)(Java Doc)
public boolean isFile()(Code)(Java Doc)
public boolean isHardLink()(Code)(Java Doc)
public boolean isLink()(Code)(Java Doc)
public boolean isObject()(Code)(Java Doc)
protected boolean isPathCacheable()(Code)(Java Doc)
public boolean isSocket()(Code)(Java Doc)
public boolean isSymbolicLink()(Code)(Java Doc)
final public static boolean isWindows()(Code)(Java Doc)
public boolean isWindowsInsecure()(Code)(Java Doc)
public Iterator<String> iterator() throws IOException(Code)(Java Doc)
public String[] list() throws IOException(Code)(Java Doc)
final public Path lookup(String name)(Code)(Java Doc)
public Path lookup(String userPath, Map<String, Object> newAttributes)(Code)(Java Doc)
public Path lookupImpl(String userPath, Map<String, Object> newAttributes)(Code)(Java Doc)
final public Path lookupNative(String name)(Code)(Java Doc)
public Path lookupNative(String name, Map<String, Object> attributes)(Code)(Java Doc)
public String lookupRelativeNativePath(Path path)(Code)(Java Doc)
public boolean mkdir() throws IOException(Code)(Java Doc)
public boolean mkdirs() throws IOException(Code)(Java Doc)
public WriteStream openAppend() throws IOException(Code)(Java Doc)
public StreamImpl openAppendImpl() throws IOException(Code)(Java Doc)
public RandomAccessStream openRandomAccess() throws IOException(Code)(Java Doc)
final public ReadStream openRead() throws IOException(Code)(Java Doc)
public StreamImpl openReadImpl() throws IOException(Code)(Java Doc)
public ReadWritePair openReadWrite() throws IOException(Code)(Java Doc)
public void openReadWrite(ReadStream is, WriteStream os) throws IOException(Code)(Java Doc)
public StreamImpl openReadWriteImpl() throws IOException(Code)(Java Doc)
final public WriteStream openWrite() throws IOException(Code)(Java Doc)
public StreamImpl openWriteImpl() throws IOException(Code)(Java Doc)
public boolean remove() throws IOException(Code)(Java Doc)
public boolean removeAll() throws IOException(Code)(Java Doc)
public boolean renameTo(Path path) throws IOException(Code)(Java Doc)
final public boolean renameTo(String path) throws IOException(Code)(Java Doc)
protected String scanScheme(String uri)(Code)(Java Doc)
abstract protected Path schemeWalk(String userPath, Map<String, Object> newAttributes, String newPath, int offset)(Code)(Java Doc)
final public static void setDefaultSchemeMap(SchemeMap schemeMap)(Code)(Java Doc)
public boolean setExecutable(boolean isExecutable)(Code)(Java Doc)
public void setLastModified(long time)(Code)(Java Doc)
public void setObject(Object obj) throws IOException(Code)(Java Doc)
final public static void setTestWindows(boolean isTest)(Code)(Java Doc)
public void setUserPath(String userPath)(Code)(Java Doc)
public void setValue(Object obj) throws Exception(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public boolean truncate() throws IOException(Code)(Java Doc)
public boolean truncate(long length) throws IOException(Code)(Java Doc)
public void unbind()(Code)(Java Doc)
public void writeToStream(OutputStream os) throws IOException(Code)(Java Doc)
public void writeToStream(OutputStreamWithBuffer os) throws IOException(Code)(Java Doc)

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.