public class JavaObjectInput extends NativeJavaObjectInput
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_BYTE_ARRAY_LENGTH |
| Constructor and Description |
|---|
JavaObjectInput(InputStream is) |
JavaObjectInput(InputStream is,
boolean compacted) |
| Modifier and Type | Method and Description |
|---|---|
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, readShortequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadAttachments, 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 in interface DataInputreadBytes in class NativeJavaObjectInputIOExceptionpublic String readUTF() throws IOException
DataInputreadUTF in interface DataInputreadUTF in class NativeJavaObjectInputIOExceptionpublic Object readObject() throws IOException, ClassNotFoundException
ObjectInputObjectInput.readObject(Class) or ObjectInput.readObject(Class, Type) where possiblereadObject in interface ObjectInputreadObject in class NativeJavaObjectInputIOException - if an I/O error occursClassNotFoundException - if an ClassNotFoundException occurspublic <T> T readObject(Class<T> cls) throws IOException, ClassNotFoundException
ObjectInputreadObject in interface ObjectInputreadObject in class 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 in interface ObjectInputreadObject in class NativeJavaObjectInputcls - object classtype - object typeIOException - if an I/O error occursClassNotFoundException - if an ClassNotFoundException occursCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.