Class SerialUnmarshaller

    • Field Detail

      • UNSHARED

        private static final java.lang.Object UNSHARED
      • UNRESOLVED

        private static final java.lang.Object UNRESOLVED
      • instanceCache

        private final java.util.ArrayList<java.lang.Object> instanceCache
      • depth

        private int depth
      • version

        private int version
      • EMPTY_INTS

        private static final int[] EMPTY_INTS
      • EMPTY_STRINGS

        private static final java.lang.String[] EMPTY_STRINGS
      • createObjectOutputStreamAction

        private final java.security.PrivilegedExceptionAction<SerialObjectInputStream> createObjectOutputStreamAction
      • validationMap

        private final java.util.SortedMap<java.lang.Integer,​java.util.Set<java.io.ObjectInputValidation>> validationMap
    • Method Detail

      • doReadObject

        protected java.lang.Object doReadObject​(boolean unshared)
                                         throws java.lang.ClassNotFoundException,
                                                java.io.IOException
        Description copied from class: AbstractObjectInput
        Implementation of the actual object-reading method.
        Specified by:
        doReadObject in class AbstractObjectInput
        Parameters:
        unshared - true if the instance should be unshared, false if it is shared
        Returns:
        the object to read
        Throws:
        java.lang.ClassNotFoundException - if the class for the object could not be loaded
        java.io.IOException - if an I/O error occurs
      • doReadString

        java.lang.String doReadString()
                               throws java.io.IOException,
                                      java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • readBackReference

        java.lang.Object readBackReference​(int handle)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • doReadObject

        java.lang.Object doReadObject​(int leadByte,
                                      boolean unshared)
                               throws java.io.IOException,
                                      java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • doReadSerialObject

        private void doReadSerialObject​(Descriptor descriptor,
                                        java.lang.Object obj)
                                 throws java.lang.ClassNotFoundException,
                                        java.io.IOException
        Throws:
        java.lang.ClassNotFoundException
        java.io.IOException
      • objectStreamClassException

        private static java.io.InvalidClassException objectStreamClassException()
      • readNonNullClassDescriptor

        private Descriptor readNonNullClassDescriptor()
                                               throws java.lang.ClassNotFoundException,
                                                      java.io.IOException
        Throws:
        java.lang.ClassNotFoundException
        java.io.IOException
      • readClassDescriptor

        private Descriptor readClassDescriptor​(boolean required)
                                        throws java.lang.ClassNotFoundException,
                                               java.io.IOException
        Throws:
        java.lang.ClassNotFoundException
        java.io.IOException
      • readClassDescriptor

        private Descriptor readClassDescriptor​(int leadByte,
                                               boolean required)
                                        throws java.io.IOException,
                                               java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • badLeadByte

        private java.io.StreamCorruptedException badLeadByte​(int leadByte)
      • clearInstanceCache

        public void clearInstanceCache()
                                throws java.io.IOException
        Description copied from interface: Unmarshaller
        Discard the instance cache.
        Specified by:
        clearInstanceCache in interface Unmarshaller
        Throws:
        java.io.IOException - if an error occurs
      • clearClassCache

        public void clearClassCache()
                             throws java.io.IOException
        Description copied from interface: Unmarshaller
        Discard the class cache. Implicitly also discards the instance cache.
        Specified by:
        clearClassCache in interface Unmarshaller
        Throws:
        java.io.IOException - if an error occurs
      • start

        public void start​(ByteInput byteInput)
                   throws java.io.IOException
        Description copied from class: AbstractUnmarshaller
        Start reading from the given input. The internal buffer is discarded.
        Specified by:
        start in interface Unmarshaller
        Overrides:
        start in class AbstractUnmarshaller
        Parameters:
        byteInput - the new input from which to read
        Throws:
        java.io.IOException - not thrown by this implementation, but may be overridden to be thrown if a problem occurs
      • finish

        public void finish()
                    throws java.io.IOException
        Description copied from class: AbstractUnmarshaller
        Finish reading from the current input. The internal buffer is discarded, not flushed.
        Specified by:
        finish in interface Unmarshaller
        Overrides:
        finish in class AbstractUnmarshaller
        Throws:
        java.io.IOException - not thrown by this implementation, but may be overridden to be thrown if a problem occurs
      • close

        public void close()
                   throws java.io.IOException
        Description copied from class: SimpleDataInput
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.io.ObjectInput
        Overrides:
        close in class SimpleDataInput
        Throws:
        java.io.IOException
      • createObjectInputStream

        private SerialObjectInputStream createObjectInputStream()
                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • getObjectInputStream

        SerialObjectInputStream getObjectInputStream()
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • addValidation

        void addValidation​(java.io.ObjectInputValidation validation,
                           int prio)
      • descriptorForClass

        public Descriptor descriptorForClass​(java.lang.Class<?> clazz)
      • replaceOrReturn

        private java.lang.Object replaceOrReturn​(boolean unshared,
                                                 java.lang.Object object)
      • replaceOrReturn

        private java.lang.Object replaceOrReturn​(boolean unshared,
                                                 java.lang.Object object,
                                                 int idx)