| writeLine |
(Stream stream, String str) |
yoix.io |
| |
Tries to write string
str
to
stream
followed by the line separator string,
which may not be a single newline character,
and returns the number of characters actually written or
-1
if an error occurs.
| |
| Example: |
On a UNIX-like system the program,
import yoix.io.*;
String line;
File file;
if ((file = open("/etc/passwd", "r")) != NULL) {
while ((line = readLine(file)) != NULL)
writeLine(stdout, line);
close(file);
}
copies the system password file to standard output, one line
at a time.
| | |
| Return: |
int
| | |
| See Also: |
write,
writeChar
|
|
Yoix is a registered trademark of AT&T Intellectual Property.
|