Resin 1.1
FAQ
Reference
JavaDoc
Demo
Java Tutorial
Getting Started
Configuration
Topics
JSP
XTP/XSL
JavaScript
JS Library
Core Library
File Library
Servlet Library
Database Library
XML Library
VFS
File
ReadStream
WriteStream
InputStream
OutputStream
Write Streams
WriteStream instances are roughly comparable to a combination of the Java `OutputStream` and `Writer` classes. Write streams inherit from `WriteStream`, so you can pass them to Java methods expecing `WriteStreams`. Stream instances are always buffered.
Write Stream instance properties
writeByte(b) | Writes the byte to the stream.
write(string) | Writes the string to the stream.
writeln(string) | Writes the string to the stream, appending a newline.
printf(fmt, ...) | Writes formatted output to the stream.
writeStream(stream) | Writes the entire contents of stream to the stream.
writeFile(file) | Writes the entire contents of the File object file to the stream.
outputStream | Returns a JDK OutputStream tied to the stream.
flush() | Flushes output to the stream.
close() | Closes the stream.
Write Stream instance properties | Resin 1.0
### writeByte(b)
Writes the byte to the stream.
out.writeByte(65)
A
### write(string)
Writes the string to the stream.
out.write("2 + 2 = ", 2 + 2) out.writeln("; 4 + 4 = ", 4 + 4)
2 + 2 = 4; 4 + 4 = 8
### writeln(string)
Writes the string to the stream, appending a newline.
out.writeln("2 + 2 = ", 2 + 2) out.writeln("4 + 4 = ", 4 + 4)
2 + 2 = 4 4 + 4 = 8
### printf(fmt, ...)
Writes formatted output to the stream. Resin's printf function follows C's.
### writeStream(stream)
Writes the entire contents of stream to the stream.
### writeFile(file)
Writes the entire contents of the File object file to the stream. `writeFile` opens the file object file as in `openRead`. It copies the entire contents of file to the stream as `writeStream`. Finally, it closes the stream. The following example writes the home page of caucho.com to out.
out.writeFile(File("http://www.caucho.com"))
### outputStream
Returns a JDK OutputStream tied to the stream.
### flush()
Flushes output to the stream.
### close()
Closes the stream.
ReadStream |  | InputStream
Copyright © 1998-2000 Caucho Technology. All rights reserved. Last modified: Mon, 03 Apr 2000 11:20:13 -0700 (PDT)