com.caucho.vfs

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 
com.caucho.vfs
Resin's Virtual File System. Resin's VFS combines and simplifies the morass in Java I/O. The core classes are:
  • Path -- API similar to File, but supports URLs as well as paths.
  • ReadStream -- buffered read stream handing both byte and character input
  • WriteStream -- buffered write stream handling both byte and character output

Virtual Paths

Path access is based on standard URLs. The following URL schemes are predefined.

  • file: -- the standard filesystem
  • http: -- the http filesystem
  • mailto: -- sending mail
  • stdout: -- standard output (System.out)
  • stderr: -- standard error (System.err)
  • tcp: -- TCP socket pair
  • null: -- /dev/null
  • log: -- debug logging (controlled by resin.conf)

Reading a File

ReadStream implements InputStream so it can be used wherever an InputStream is appropriate.

The Vfs facade is convenient for opening files.

ReadStream rs = Vfs.openRead("http://www.yahoo.com");
int ch;

while ((ch = rs.read()) >= 0)
  System.out.print((char) ch);

Writing a File

WriteStream implements OutputStream so it can be used wherever an OutputStream is appropriate. It also implements the familiar print() methods from PrintStream, although they do throw IOExceptions.

The Vfs facade is convenient for opening files.

WriteStream ws = Vfs.openWrite("mailto:user@foo.com");
ws.setAttribute("subject", "hi, there");

ws.println("Just a little hello, world message");
ws.close();
Java Source File NameTypeComment
AbstractByteToChar.javaClass Utility class for converting a byte stream to a character stream.
AbstractPrintWriter.javaClass An abstract print writer.
BasicDependencyContainer.javaClass Contains a set of dependencies.
BindPath.javaClass
BufferedReaderAdapter.javaClass Trivial adapter so readers and input streams can be used in the same servlet.
ByteToChar.javaClass Utility class for converting a byte stream to a character stream.
ByteToCharWriter.javaClass Utility class for converting a byte stream to a character stream.
ClientDisconnectException.javaClass Exception thrown when a client unexpectedly closes a connection.
ConstPath.javaClass
ContextLoaderObjectInputStream.javaClass Object input stream which loads based on the context class loader.
Crc64Stream.javaClass
Depend.javaClass Class for keeping track of modifications.
Dependency.javaInterface Interface representing a resource that might change.
EnclosedWriteStream.javaInterface
Encoding.javaClass Converts between the mime encoding names and Java encoding names.
FilePath.javaClass FilePath implements the native filesystem.
FileRandomAccessStream.javaClass Reads from a file in a random-access fashion.
FileReadStream.javaClass
FileStatus.javaClass
FilesystemPath.javaClass Abstract FilesystemPath, the parent of hierarchical Paths like FilePath or HttpPath.
FileWriteStream.javaClass
FlushBuffer.javaInterface Interface if a writer supports the flushBuffer().
HttpPath.javaClass The HTTP scheme.
HttpsPath.javaClass The HTTP scheme.
HttpStream.javaClass Underlying stream handling HTTP requests.
HttpStreamWrapper.javaClass Facade to HttpStream to properly handle the close.
IOExceptionWrapper.javaClass
IOTimeoutException.javaClass
JndiPath.javaClass Adapts the JNDI to the Path API.
LockableStream.javaInterface
MemoryStream.javaClass
MultipartStream.javaClass
NotFoundPath.javaClass Always returns FileNotFound for any open attempt.
NullPath.javaClass
NullWriteStream.javaClass A WriteStream that writes to nothing.
OldByteToChar.javaClass Utility class for converting a byte stream to a character stream.
OutputStreamWithBuffer.javaClass An OutputStream with an accessible buffer.
Path.javaClass A virtual filesystem path, essentially represented by a URL. Its API resembles a combination of the JDK File object and the URL object.

Paths are, in general, given with the canonical file separator of forward slash, '/'.

PathWrapper.javaClass Wraps a path object.
PersistentDependency.javaInterface Interface representing a resource that might change.
PipeStream.javaClass Stream allowing two threads to read and write to each other.
PrintWriterImpl.javaClass A print writer which allows for a changing writer.
QServerSocket.javaClass Abstract socket to handle both normal sockets and bin/resin sockets.
QSocket.javaClass Abstract socket to handle both normal sockets and JNI sockets.
RandomAccessStream.javaClass Reads from a file in a random-access fashion.
ReaderStream.javaClass
ReaderWriterStream.javaClass
ReadStream.javaClass A fast bufferered input stream supporting both character and byte data.
ReadWritePair.javaClass
SchemeMap.javaClass The top-level filesystem schemes are collected into a single map.

The default scheme has a number of standard filesystems, file:, mailto:, jndi:, http:.

Applications can add schemes in the configuration file.

SocketStream.javaClass Specialized stream to handle sockets.
SpyRandomAccessStream.javaClass Reads from a file in a random-access fashion.
StderrStream.javaClass Stream encapsulating System.err.
StdoutStream.javaClass Stream encapsulating System.out.
StreamFilter.javaClass
StreamImpl.javaClass This is the service provider's interface for a stream supported by the VFS.
StreamImplInputStream.javaClass
StreamImplOutputStream.javaClass Unbuffered output stream to the stream impl the VFS.
StreamPrintWriter.javaClass A print writer which writes to a specific WriteStream.
StringPath.javaClass
StringReader.javaClass A stream reading data from a string.
StringStream.javaClass
StringWriter.javaClass
Syslog.javaClass Stream which writes to syslog.
TcpPath.javaClass Implements a tcp stream, essentially just a socket pair.
TcpsPath.javaClass Implements a tcp stream, essentially just a socket pair.
TcpStream.javaClass Implementation of a TCP stream.
TempBuffer.javaClass Pooled temporary byte buffer.
TempCharBuffer.javaClass
TempCharReader.javaClass Char reader based on an underlying buffer.
TempCharStream.javaClass
TempFile.javaClass
TempOutputStream.javaClass
TempReadStream.javaClass
TempStream.javaClass
Utf16RevReader.javaClass
VfsStream.javaClass Stream encapsulating InputStream/OutputStream.
VfsWriteObject.javaInterface
WriterStreamImpl.javaClass Handles a stream which outputs to a writer.
WriteStream.javaClass A fast bufferered output stream supporting both character and byte data.
XmlWriter.javaClass
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.