⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readstream.html

📁 学习JAVA的很好的JAVA包和文档包
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TD><CODE><B><A HREF="../structure/ReadStream.html#pushbackChar(char)">pushbackChar</A></B>(char&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return character to input stream for reading at later time.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readBoolean()">readBoolean</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the next word "true" or "false" as a boolean.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;char</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readChar()">readChar</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read next character, whitespace or not.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readDouble()">readDouble</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads the next double value from input stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readFloat()">readFloat</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read floating point value from input (Currently not working).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readFully(byte[])">readFully</A></B>(byte[]&nbsp;b)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read an array of bytes from input.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readFully(byte[], int, int)">readFully</A></B>(byte[]&nbsp;b,          int&nbsp;off,          int&nbsp;len)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read input into byte array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readInt()">readInt</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an integer from input stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readLine()">readLine</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the remainder of line, including end-of-line mark.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readln()">readln</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read characters up to and including the end-of-line mark.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readLong()">readLong</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read a (potentially long) input.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readShort()">readShort</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an integer from input stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readString()">readString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Skip white space and read in the next non-whitespace word as a string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#readUTF()">readUTF</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read unicode from input.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReadStream.html#skipWhite()">skipWhite</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Consume all the white-space characters until EOF or other data.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.io.FilterInputStream"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html">FilterInputStream</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html#available()">available</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html#close()">close</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html#mark(int)">mark</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html#markSupported()">markSupported</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html#read()">read</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html#read(byte[])">read</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html#read(byte[], int, int)">read</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html#reset()">reset</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/FilterInputStream.html#skip(long)">skip</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#<clinit>()"><clinit></A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#registerNatives()">registerNatives</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="strm"><!-- --></A><H3>strm</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/DataInputStream.html">DataInputStream</A> <B>strm</B></PRE><DL><DD>The underlying data stream.</DL><HR><A NAME="atEOF"><!-- --></A><H3>atEOF</H3><PRE>protected boolean <B>atEOF</B></PRE><DL><DD>True iff we've seen the end-of-file</DL><HR><A NAME="buffer"><!-- --></A><H3>buffer</H3><PRE>protected char[] <B>buffer</B></PRE><DL><DD>The buffer to hold pushback characters</DL><HR><A NAME="buffersize"><!-- --></A><H3>buffersize</H3><PRE>protected int <B>buffersize</B></PRE><DL><DD>The number of characters to be stored in buffer.</DL><HR><A NAME="buffertop"><!-- --></A><H3>buffertop</H3><PRE>protected int <B>buffertop</B></PRE><DL></DL><HR><A NAME="absorbNL"><!-- --></A><H3>absorbNL</H3><PRE>protected boolean <B>absorbNL</B></PRE><DL><DD>Whether or not accept the CR as part of previous newline.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="ReadStream()"><!-- --></A><H3>ReadStream</H3><PRE>public <B>ReadStream</B>()</PRE><DL><DD>Construct an empty ReadStream, obtaining info from System.in.</DL><HR><A NAME="ReadStream(java.io.InputStream)"><!-- --></A><H3>ReadStream</H3><PRE>public <B>ReadStream</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/InputStream.html">InputStream</A>&nbsp;strm)</PRE><DL><DD>Construct a ReadStream based on pre-existing input stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>strm</CODE> - The pre-existing input stream.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="eof()"><!-- --></A><H3>eof</H3><PRE>public boolean <B>eof</B>()</PRE><DL><DD>Determine if we've seen end-of-file.<DD><DL><DT><B>Precondition:</B><DD>are we at the end-of-file?<DT><B>Returns:</B><DD>True if the next character to be read is EOF.</DL></DD></DL><HR><A NAME="isWhite(char)"><!-- --></A><H3>isWhite</H3><PRE>private static boolean <B>isWhite</B>(char&nbsp;c)</PRE><DL></DL><HR><A NAME="getFirst()"><!-- --></A><H3>getFirst</H3>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -