Class ShadowingPersistentInputStream
java.lang.Object
io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream
io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.PersistentInputStream
io.deephaven.enterprise.compatibility.shadow.ShadowingPersistentInputStream
- All Implemented Interfaces:
io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectStreamConstants
,Closeable
,DataInput
,ObjectInput
,AutoCloseable
public class ShadowingPersistentInputStream
extends io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.PersistentInputStream
Enterprise makes extensive use of Java serialization through WObjectOutput/InputStream. Those Stream implementations
use a custom encoding to write the data too. The unfortunate consequence of this is that we'll end up with encoded
package names that do not match our shadowed versions. This class attempts to dynamically rewrite certain package
prefixes at load time into their shadowed versions.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream
io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream.ObjectConverter, io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream.WrappedObjectInputStream
-
Field Summary
Fields inherited from class io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream
in_
Fields inherited from interface io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectStreamConstants
ADD_CLASS, ADD_COLUMN_SET_CLASS, ADD_ENUM, ADD_ENUM_LONG, ADO_ARRAY_TYPE, ARRAY_TYPE, BOOLEAN_TYPE, BYTE_ARRAY_TYPE, BYTE_TYPE, DATE_TYPE, DOUBLE_ARRAY_TYPE, DOUBLE_TYPE, FLOAT_ARRAY_TYPE, FLOAT_TYPE, INT_ARRAY_TYPE, INTEGER_TYPE, KNOWN_ENUM, KNOWN_ENUM_LONG, LINKED_MAP_TYPE, LINKED_SET_TYPE, LONG_ARRAY_TYPE, LONG_STRING_TYPE, LONG_TYPE, MAP_TYPE, NULL_TYPE, OBJECT_TYPE, SET_TYPE, STRING_ARRAY_TYPE, STRING_TYPE, TREE_MAP_TYPE, TREE_SET_TYPE
-
Constructor Summary
ConstructorsConstructorDescriptionShadowingPersistentInputStream
(@NotNull InputStream in, @NotNull ClassLoader classLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream.ObjectConverter
getReaderForType
(@NotNull String typeString) There are a few different paths within WObjectInputStream that resolve packages to real classes, this one handles the path when the object is plainly encoded in the stream.protected ObjectStreamClass
resolveClassDescriptorOverride
(@NotNull ObjectStreamClass input) Methods inherited from class io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.PersistentInputStream
getColumnSet, getConversionSchema
Methods inherited from class io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream
available, close, getClassForType, read, read, read, readBoolean, readByte, readChar, readClassDescriptorOverride, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readShort, readUnsignedByte, readUnsignedShort, readUTF, skip, skipBytes
-
Constructor Details
-
ShadowingPersistentInputStream
public ShadowingPersistentInputStream(@NotNull @NotNull InputStream in, @NotNull @NotNull ClassLoader classLoader) throws IOException, ClassNotFoundException - Throws:
IOException
ClassNotFoundException
-
-
Method Details
-
resolveClassDescriptorOverride
protected ObjectStreamClass resolveClassDescriptorOverride(@NotNull @NotNull ObjectStreamClass input) throws ClassNotFoundException - Overrides:
resolveClassDescriptorOverride
in classio.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream
- Throws:
ClassNotFoundException
-
getReaderForType
protected io.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream.ObjectConverter getReaderForType(@NotNull @NotNull String typeString) throws ClassNotFoundException There are a few different paths within WObjectInputStream that resolve packages to real classes, this one handles the path when the object is plainly encoded in the stream.- Overrides:
getReaderForType
in classio.deephaven.shadow.enterprise.com.fishlib.dataobjects.persistence.WObjectInputStream
- Parameters:
typeString
- the input type being read- Returns:
- an
WObjectInputStream.ObjectConverter
- Throws:
ClassNotFoundException
- if the conversion was not possible
-