public class JavaObjectInput extends NativeJavaObjectInput
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
MAX_BYTE_ARRAY_LENGTH |
| 构造器和说明 |
|---|
JavaObjectInput(InputStream is) |
JavaObjectInput(InputStream is,
boolean compacted) |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
readBytes()
Read byte array.
|
Object |
readObject()
Consider use
ObjectInput.readObject(Class) or ObjectInput.readObject(Class, Type) where possible |
<T> T |
readObject(Class<T> cls)
read object
|
<T> T |
readObject(Class<T> cls,
Type type)
read object
|
String |
readUTF()
Read UTF-8 string.
|
readBool, readByte, readDouble, readFloat, readInt, readLong, readShortreadAttachments, readEvent, readThrowablepublic static final int MAX_BYTE_ARRAY_LENGTH
public JavaObjectInput(InputStream is) throws IOException
IOExceptionpublic JavaObjectInput(InputStream is, boolean compacted) throws IOException
IOExceptionpublic byte[] readBytes()
throws IOException
DataInputreadBytes 在接口中 DataInputreadBytes 在类中 NativeJavaObjectInputIOExceptionpublic String readUTF() throws IOException
DataInputreadUTF 在接口中 DataInputreadUTF 在类中 NativeJavaObjectInputIOExceptionpublic Object readObject() throws IOException, ClassNotFoundException
ObjectInputObjectInput.readObject(Class) or ObjectInput.readObject(Class, Type) where possiblereadObject 在接口中 ObjectInputreadObject 在类中 NativeJavaObjectInputIOException - if an I/O error occursClassNotFoundException - if an ClassNotFoundException occurspublic <T> T readObject(Class<T> cls) throws IOException, ClassNotFoundException
ObjectInputreadObject 在接口中 ObjectInputreadObject 在类中 NativeJavaObjectInputcls - object classIOException - if an I/O error occursClassNotFoundException - if an ClassNotFoundException occurspublic <T> T readObject(Class<T> cls, Type type) throws IOException, ClassNotFoundException
ObjectInputreadObject 在接口中 ObjectInputreadObject 在类中 NativeJavaObjectInputcls - object classtype - object typeIOException - if an I/O error occursClassNotFoundException - if an ClassNotFoundException occursCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.