Package org.jboss.marshalling
Class UnmarshallingObjectInputStream
java.lang.Object
java.io.InputStream
java.io.ObjectInputStream
org.jboss.marshalling.UnmarshallingObjectInputStream
- All Implemented Interfaces:
Closeable,DataInput,ObjectInput,ObjectStreamConstants,AutoCloseable
An object input stream which wraps an
Unmarshaller, which may be used by legacy ObjectInputStream-based
applications that wish to use the marshalling framework.-
Nested Class Summary
Nested classes/interfaces inherited from class java.io.ObjectInputStream
ObjectInputStream.GetField -
Field Summary
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, SERIAL_FILTER_PERMISSION, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING -
Constructor Summary
ConstructorsConstructorDescriptionUnmarshallingObjectInputStream(Unmarshaller unmarshaller, InputStream stream) Construct a new instance which delegates to the given unmarshaller, reading from the given input.UnmarshallingObjectInputStream(Unmarshaller unmarshaller, ByteInput byteInput) Construct a new instance which delegates to the given unmarshaller, reading from the given input. -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()voidMay not be invoked in this context.protected final booleanenableResolveObject(boolean enable) intread()intread(byte[] b) intread(byte[] b, int off, int len) booleanbytereadByte()charreadChar()protected final ObjectStreamClassdoubleMay not be invoked in this context.floatvoidreadFully(byte[] b) voidreadFully(byte[] b, int off, int len) intreadInt()readLine()Deprecated.longreadLong()protected Objectshortprotected final voidintintreadUTF()voidregisterValidation(ObjectInputValidation obj, int prio) May not be invoked in this context.protected final Class<?>protected final ObjectresolveObject(Object obj) protected final Class<?>resolveProxyClass(String[] interfaces) longskip(long n) intskipBytes(int n) Methods inherited from class java.io.ObjectInputStream
getObjectInputFilter, readObject, setObjectInputFilterMethods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
UnmarshallingObjectInputStream
public UnmarshallingObjectInputStream(Unmarshaller unmarshaller, InputStream stream) throws IOException, SecurityException Construct a new instance which delegates to the given unmarshaller, reading from the given input. The unmarshaller will read from the input stream until it is closed.- Parameters:
unmarshaller- the delegate unmarshallerstream- the input stream to read from- Throws:
IOException- if an I/O error occursSecurityException- if the caller does not have permission to construct an instance of this class
-
UnmarshallingObjectInputStream
public UnmarshallingObjectInputStream(Unmarshaller unmarshaller, ByteInput byteInput) throws IOException, SecurityException Construct a new instance which delegates to the given unmarshaller, reading from the given input. The unmarshaller will read from the input stream until it is closed.- Parameters:
unmarshaller- the delegate unmarshallerbyteInput- the input stream to read from- Throws:
IOException- if an I/O error occursSecurityException- if the caller does not have permission to construct an instance of this class
-
-
Method Details
-
readObjectOverride
- Overrides:
readObjectOverridein classObjectInputStream- Throws:
ClassNotFoundExceptionIOException
-
read
- Specified by:
readin interfaceObjectInput- Overrides:
readin classObjectInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceObjectInput- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceObjectInput- Overrides:
readin classObjectInputStream- Throws:
IOException
-
skip
- Specified by:
skipin interfaceObjectInput- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Specified by:
availablein interfaceObjectInput- Overrides:
availablein classObjectInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectInput- Overrides:
closein classObjectInputStream- Throws:
IOExceptionIllegalStateException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classObjectInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classObjectInputStream- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin interfaceDataInput- Overrides:
skipBytesin classObjectInputStream- Throws:
IOException
-
readBoolean
- Specified by:
readBooleanin interfaceDataInput- Overrides:
readBooleanin classObjectInputStream- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Overrides:
readBytein classObjectInputStream- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfaceDataInput- Overrides:
readUnsignedBytein classObjectInputStream- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Overrides:
readShortin classObjectInputStream- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfaceDataInput- Overrides:
readUnsignedShortin classObjectInputStream- Throws:
IOException
-
readChar
- Specified by:
readCharin interfaceDataInput- Overrides:
readCharin classObjectInputStream- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Overrides:
readIntin classObjectInputStream- Throws:
IOException
-
readLong
- Specified by:
readLongin interfaceDataInput- Overrides:
readLongin classObjectInputStream- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Overrides:
readFloatin classObjectInputStream- Throws:
IOException
-
readDouble
- Specified by:
readDoublein interfaceDataInput- Overrides:
readDoublein classObjectInputStream- Throws:
IOException
-
readLine
Deprecated.- Specified by:
readLinein interfaceDataInput- Overrides:
readLinein classObjectInputStream- Throws:
IOException
-
readUTF
- Specified by:
readUTFin interfaceDataInput- Overrides:
readUTFin classObjectInputStream- Throws:
IOException
-
resolveClass
- Overrides:
resolveClassin classObjectInputStream- Throws:
IllegalStateException
-
resolveProxyClass
- Overrides:
resolveProxyClassin classObjectInputStream- Throws:
IllegalStateException
-
resolveObject
- Overrides:
resolveObjectin classObjectInputStream- Throws:
IllegalStateException
-
enableResolveObject
- Overrides:
enableResolveObjectin classObjectInputStream- Throws:
IllegalStateException
-
readStreamHeader
- Overrides:
readStreamHeaderin classObjectInputStream- Throws:
IllegalStateException
-
readClassDescriptor
- Overrides:
readClassDescriptorin classObjectInputStream- Throws:
IllegalStateException
-
defaultReadObject
May not be invoked in this context.- Overrides:
defaultReadObjectin classObjectInputStream- Throws:
IllegalStateException- always
-
readFields
May not be invoked in this context.- Overrides:
readFieldsin classObjectInputStream- Throws:
IllegalStateException- always
-
registerValidation
May not be invoked in this context.- Overrides:
registerValidationin classObjectInputStream- Parameters:
obj- ignoredprio- ignored- Throws:
IllegalStateException- always