System.in object for the standard input
to a program, corresponding to the System.out object
for standard output.
System.in is a member of java.lang.InputStream.
InputStreams.
DataInputStream from
the input stream.
DataInputStream from
the file, rather than standard input.
DataInputStream provides much more useful and
usable methods than InputStream. However, these
methods are generally only appropriate for non-character data
and assume that you've written the data using a
DataOutputStream.
DataInputString.readByte(),
but that will require you to do a lot of work converting to
appropriate forms.
EOFException is thrown when you try to read
beyond the end of the file.
DataInputStream and its associated exceptions are not
automatically part of your program. You must import them. It is
easiest to do so with import java.io.*.
Reader (and, more importantly,
InputStreamReader and BufferedReader).
new BufferedReader(new InputStreamReader(System.in));
readLine() method does not seem to throw
EOFExceptions.
ReadStream Class
ReadStream class.
readChar()
readLine()
readInt()
eof()
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Tue Oct 7 17:12:39 1997.
This page generated on Wed Nov 5 12:38:41 1997 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu