![]() |
![]() Resin Stream instances are roughly comparable to a combination of the Java InputStream and Reader classes, or to put it another way.
Read streams inherit from Stream instances are always buffered.
Reads a single byte from the stream and returns it as a number.
It returns -1 on end of file.
Reads n characters from the stream and returns them as a string. If n is
omitted, reads a single character.
It returns null on end of file.
Reads a line from the stream and returns a string. Lines are
delimited by a linefeed ('\n'). The trailing cr-lf is stripped from
the string.
Returns null on end of file.
This function returns the bytes available to be
read. The only guarantee is that if there are bytes to be read
available will be non-zero.
The position in the file counted as bytes from the beginning of the
file. Reading it will return the current position and writing to it
will set the position.
For some streams, like standard input, standard output and tcp/ip streams this returns a read-only value of 0.
Returns a JDK InputStream tied to this stream.
Closes the stream.
|