![]() |
![]()
Resin's file library coalesces Java's cacophony of conflicting I/O classes. All the different classes for input and output streams, readers and writers, collapse into the single Stream class. All filesystem, naming, directory and opening functions collapse into the single File class. File names are always URLs.
The filesystem supports several virtual
filesystems using the familiar URL scheme. Sending mail
(
mailto: ) and retrieving HTTP documents (http: ) uses the
same file and stream API as files do.
The File object provides path and
filesystem support: opening and removing files, listing directories,
and retrieving file attributes. Paths are always URLs, using '/'
to separate path components.
Read Streams encapsulate reading from
files. Resin streams combine Java's
InputStream ,
and Reader classes.
Write streams encapsulate writing to
files. Resin streams combine Java's
OutputStream ,
and Writer classes.
Resin modifies Java's InputStream
to make it compatible with JavaScript.
Resin modifies Java's OutputStream
to make it compatible with JavaScript.
|