📄 objectinputstream.html
字号:
<TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#ObjectInputStream(java.io.InputStream)">ObjectInputStream</A></B>(<A HREF="../../java/io/InputStream.html">InputStream</A> in)</CODE><BR> Create an ObjectInputStream that reads from the specified InputStream.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#available()">available</A></B>()</CODE><BR> Returns the number of bytes that can be read without blocking.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#close()">close</A></B>()</CODE><BR> Closes the input stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#defaultReadObject()">defaultReadObject</A></B>()</CODE><BR> Read the non-static and non-transient fields of the current class from this stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#enableResolveObject(boolean)">enableResolveObject</A></B>(boolean enable)</CODE><BR> Enable the stream to allow objects read from the stream to be replaced.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#read()">read</A></B>()</CODE><BR> Reads a byte of data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#read(byte[], int, int)">read</A></B>(byte[] b, int off, int len)</CODE><BR> Reads into an array of bytes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readBoolean()">readBoolean</A></B>()</CODE><BR> Reads in a boolean.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readByte()">readByte</A></B>()</CODE><BR> Reads an 8 bit byte.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> char</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readChar()">readChar</A></B>()</CODE><BR> Reads a 16 bit char.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/io/ObjectStreamClass.html">ObjectStreamClass</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readClassDescriptor()">readClassDescriptor</A></B>()</CODE><BR> Read a class descriptor from the serialization stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readDouble()">readDouble</A></B>()</CODE><BR> Reads a 64 bit double.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/ObjectInputStream.GetField.html">ObjectInputStream.GetField</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readFields()">readFields</A></B>()</CODE><BR> Reads the persistent fields from the stream and makes them available by name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readFloat()">readFloat</A></B>()</CODE><BR> Reads a 32 bit float.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readFully(byte[])">readFully</A></B>(byte[] data)</CODE><BR> Reads bytes, blocking until all bytes are read.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readFully(byte[], int, int)">readFully</A></B>(byte[] data, int offset, int size)</CODE><BR> Reads bytes, blocking until all bytes are read.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readInt()">readInt</A></B>()</CODE><BR> Reads a 32 bit int.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readLine()">readLine</A></B>()</CODE><BR> <B>Deprecated.</B> <I>This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readLong()">readLong</A></B>()</CODE><BR> Reads a 64 bit long.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readObject()">readObject</A></B>()</CODE><BR> Read an object from the ObjectInputStream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readObjectOverride()">readObjectOverride</A></B>()</CODE><BR> This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readShort()">readShort</A></B>()</CODE><BR> Reads a 16 bit short.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readStreamHeader()">readStreamHeader</A></B>()</CODE><BR> The readStreamHeader method is provided to allow subclasses to read and verify their own stream headers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readUnsignedByte()">readUnsignedByte</A></B>()</CODE><BR> Reads an unsigned 8 bit byte.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readUnsignedShort()">readUnsignedShort</A></B>()</CODE><BR> Reads an unsigned 16 bit short.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#readUTF()">readUTF</A></B>()</CODE><BR> Reads a UTF format String.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#registerValidation(java.io.ObjectInputValidation, int)">registerValidation</A></B>(<A HREF="../../java/io/ObjectInputValidation.html">ObjectInputValidation</A> obj, int prio)</CODE><BR> Register an object to be validated before the graph is returned.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/Class.html">Class</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/ObjectInputStream.html#resolveClass(java.io.ObjectStreamClass)">resolveClass</A></B>(<A HREF="../../java/io/ObjectStreamClass.html">ObjectStreamClass</A> v)</CODE><BR> Load the local class equivalent of the specified stream class description.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -