class LegacyObjectInputStream extends ObjectInputStream

Custom ObjectInputStream that ignores the serialVersionUID check for a provided class during deserialization.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LegacyObjectInputStream
  2. ObjectInputStream
  3. ObjectStreamConstants
  4. ObjectInput
  5. DataInput
  6. InputStream
  7. Closeable
  8. AutoCloseable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new LegacyObjectInputStream(in: ByteArrayInputStream, replacedClass: Class[_], serializedClassName: String, resolveCustomDescriptor: (ObjectStreamClass) => ObjectStreamClass)

    in

    ByteArrayInputStream of the deserialization

    replacedClass

    The class that should be the replacement

    serializedClassName

    The name of the serialized class in the input stream

    resolveCustomDescriptor

    Method to provide additional legacy class descriptor mappings for custom classes. By default, doesn't provide additional classes.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def available(): Int
    Definition Classes
    ObjectInputStream → ObjectInput → InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  7. def close(): Unit
    Definition Classes
    ObjectInputStream → ObjectInput → InputStream → Closeable → AutoCloseable
    Annotations
    @throws(classOf[java.io.IOException])
  8. def defaultReadObject(): Unit
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.io.IOException]) @throws(classOf[java.lang.ClassNotFoundException])
  9. def enableResolveObject(arg0: Boolean): Boolean
    Attributes
    protected[java.io]
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.lang.SecurityException])
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. final def getObjectInputFilter(): ObjectInputFilter
    Definition Classes
    ObjectInputStream
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def mark(arg0: Int): Unit
    Definition Classes
    InputStream
  17. def markSupported(): Boolean
    Definition Classes
    InputStream
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  21. def read(arg0: Array[Byte], arg1: Int, arg2: Int): Int
    Definition Classes
    ObjectInputStream → ObjectInput → InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  22. def read(): Int
    Definition Classes
    ObjectInputStream → ObjectInput → InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  23. def read(arg0: Array[Byte]): Int
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  24. def readAllBytes(): Array[Byte]
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  25. def readBoolean(): Boolean
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  26. def readByte(): Byte
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  27. def readChar(): Char
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  28. def readClassDescriptor(): ObjectStreamClass

    Reads the class descriptor from the serialization stream, handling conflicting serialVersionUIDs (SUID) of old Spark NLP objects.

    Reads the class descriptor from the serialization stream, handling conflicting serialVersionUIDs (SUID) of old Spark NLP objects.

    We try to read the objects regardless of SUID (by ignoring them). In the case of reading old Maps, we need to use the serialization proxy from Scala 2.12 (removed in 2.13).

    Taken and adapted from https://stackoverflow.com/questions/795470/how-to-deserialize-an-object-persisted-in-a-db-now-when-the-object-has-different

    returns

    The class descriptor to be used for deserialization.

    Attributes
    protected
    Definition Classes
    LegacyObjectInputStream → ObjectInputStream
    Annotations
    @throws("I/O error occurred") @throws("class of a serialized object could not be found")
    Exceptions thrown

    ClassNotFoundException if the class of a serialized object could not be found

    IOException if an I/O error occurs

  29. def readDouble(): Double
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  30. def readFields(): GetField
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.io.IOException]) @throws(classOf[java.lang.ClassNotFoundException])
  31. def readFloat(): Float
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  32. def readFully(arg0: Array[Byte], arg1: Int, arg2: Int): Unit
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  33. def readFully(arg0: Array[Byte]): Unit
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  34. def readInt(): Int
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  35. def readLong(): Long
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  36. def readNBytes(arg0: Array[Byte], arg1: Int, arg2: Int): Int
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  37. def readNBytes(arg0: Int): Array[Byte]
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  38. final def readObject(): AnyRef
    Definition Classes
    ObjectInputStream → ObjectInput
    Annotations
    @throws(classOf[java.io.IOException]) @throws(classOf[java.lang.ClassNotFoundException])
  39. def readObjectOverride(): AnyRef
    Attributes
    protected[java.io]
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.io.IOException]) @throws(classOf[java.lang.ClassNotFoundException])
  40. def readShort(): Short
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  41. def readStreamHeader(): Unit
    Attributes
    protected[java.io]
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.io.IOException]) @throws(classOf[java.io.StreamCorruptedException])
  42. def readUTF(): String
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  43. def readUnshared(): AnyRef
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.io.IOException]) @throws(classOf[java.lang.ClassNotFoundException])
  44. def readUnsignedByte(): Int
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  45. def readUnsignedShort(): Int
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  46. def registerValidation(arg0: ObjectInputValidation, arg1: Int): Unit
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.io.NotActiveException]) @throws(classOf[java.io.InvalidObjectException])
  47. val replacedClass: Class[_]
  48. def reset(): Unit
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  49. def resolveClass(arg0: ObjectStreamClass): Class[_ <: AnyRef]
    Attributes
    protected[java.io]
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.io.IOException]) @throws(classOf[java.lang.ClassNotFoundException])
  50. def resolveLegacyDescriptor(classDescriptor: ObjectStreamClass): ObjectStreamClass

    Checks for explicit mappings of old serialized class names to replacement classes such as Scala 2.12 collection serialization proxies and Spark NLP legacy classes.

    Checks for explicit mappings of old serialized class names to replacement classes such as Scala 2.12 collection serialization proxies and Spark NLP legacy classes.

    classDescriptor

    The class descriptor read from the deserialization stream

    returns

    The replacement class descriptor, or null if no mapping found

    Attributes
    protected
  51. def resolveObject(arg0: AnyRef): AnyRef
    Attributes
    protected[java.io]
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.io.IOException])
  52. def resolveProxyClass(arg0: Array[String]): Class[_ <: AnyRef]
    Attributes
    protected[java.io]
    Definition Classes
    ObjectInputStream
    Annotations
    @throws(classOf[java.io.IOException]) @throws(classOf[java.lang.ClassNotFoundException])
  53. val serializedClassName: String
  54. final def setObjectInputFilter(arg0: ObjectInputFilter): Unit
    Definition Classes
    ObjectInputStream
  55. def skip(arg0: Long): Long
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  56. def skipBytes(arg0: Int): Int
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException])
  57. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  58. def toString(): String
    Definition Classes
    AnyRef → Any
  59. def transferTo(arg0: OutputStream): Long
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  60. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  61. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  62. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def readLine(): String
    Definition Classes
    ObjectInputStream → DataInput
    Annotations
    @throws(classOf[java.io.IOException]) @Deprecated
    Deprecated

Inherited from ObjectInputStream

Inherited from ObjectStreamConstants

Inherited from ObjectInput

Inherited from DataInput

Inherited from InputStream

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped