public interface ExtendedObjectInput
extends java.io.ObjectInput
getReflection()) and field assignments
(readAndSetProperty(Object, Property)).
Implementation instances of this interface are passed as parameter to
ExtendedObjectCodec.decode(ExtendedObjectInput, Object) method calls.
Several methods of the ObjectInput interface are tagged as deprecated and should never be used within ExtendedObjectCodec.decode(...) calls (implementations must throw UnsupportedOperationException errors).
ExtendedObjectCodec,
ExtendedObjectOutput,
JMFDeserializer,
InputContext| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlias(java.lang.String className) |
Reflection |
getReflection()
Return the
Reflection registered in the global JMF SharedContext. |
int |
read()
Deprecated.
Implementation must throw a
UnsupportedOperationException error. |
int |
read(byte[] b)
Deprecated.
Implementation must throw a
UnsupportedOperationException error. |
int |
read(byte[] b,
int off,
int len)
Deprecated.
Implementation must throw a
UnsupportedOperationException error. |
void |
readAndSetProperty(java.lang.Object obj,
Property property)
Read the next data in the current input stream and set the given field of
the given Object obj with this data.
|
void |
readFully(byte[] b)
Deprecated.
Implementation must throw a
UnsupportedOperationException error. |
void |
readFully(byte[] b,
int off,
int len)
Deprecated.
Implementation must throw a
UnsupportedOperationException error. |
java.lang.String |
readLine()
Deprecated.
Implementation must throw a
UnsupportedOperationException error. |
long |
skip(long n)
Deprecated.
Implementation must throw a
UnsupportedOperationException error. |
int |
skipBytes(int n)
Deprecated.
Implementation must throw a
UnsupportedOperationException error. |
Reflection getReflection()
Reflection registered in the global JMF SharedContext.java.lang.String getAlias(java.lang.String className)
void readAndSetProperty(java.lang.Object obj,
Property property)
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
Field to this
data without knowing its type.
For example, given a field f1 of type boolean (the primitive type) and
a field f2 of type int (the primitive type):
in.readAndSetProperty(obj, f1); in.readAndSetProperty(obj, f2);is equivalent to:
f1.setBoolean(obj, in.readBoolean()); f2.setInt(obj, in.readInt());
obj - The instance of the class declaring the property.property - The property to set with the read value.java.io.IOException - If any I/O error occur.JMFEncodingException - If read data isn't of expected type (ie. the type of the given property).java.lang.ClassNotFoundException - If the class of a serialized object cannot be found.java.lang.IllegalAccessException - If the property cannot be accessed.java.lang.reflect.InvocationTargetException@Deprecated
int read()
throws java.io.IOException
UnsupportedOperationException error.ExtendedObjectCodec.
Use DataInput.readByte() instead.read in interface java.io.ObjectInputjava.io.IOException@Deprecated
int read(byte[] b)
throws java.io.IOException
UnsupportedOperationException error.ExtendedObjectCodec.
Use (byte[])ObjectInput.readObject() instead.read in interface java.io.ObjectInputjava.io.IOException@Deprecated
int read(byte[] b,
int off,
int len)
throws java.io.IOException
UnsupportedOperationException error.ExtendedObjectCodec.
Use (byte[])ObjectInput.readObject() instead.read in interface java.io.ObjectInputjava.io.IOException@Deprecated
void readFully(byte[] b)
throws java.io.IOException
UnsupportedOperationException error.ExtendedObjectCodec.
Use (byte[])ObjectInput.readObject() instead.readFully in interface java.io.DataInputjava.io.IOException@Deprecated
void readFully(byte[] b,
int off,
int len)
throws java.io.IOException
UnsupportedOperationException error.ExtendedObjectCodec.
Use (byte[])ObjectInput.readObject() instead.readFully in interface java.io.DataInputjava.io.IOException@Deprecated
java.lang.String readLine()
throws java.io.IOException
UnsupportedOperationException error.ExtendedObjectCodec.
Use DataInput.readUTF() instead and parse the String.readLine in interface java.io.DataInputjava.io.IOException@Deprecated
int skipBytes(int n)
throws java.io.IOException
UnsupportedOperationException error.ExtendedObjectCodec.skipBytes in interface java.io.DataInputjava.io.IOException@Deprecated
long skip(long n)
throws java.io.IOException
UnsupportedOperationException error.ExtendedObjectCodec.skip in interface java.io.ObjectInputjava.io.IOException