< prev index next >

src/share/classes/java/io/ObjectInputStream.java

Print this page




  26 package java.io;
  27 
  28 import java.io.ObjectStreamClass.WeakClassKey;
  29 import java.lang.ref.ReferenceQueue;
  30 import java.lang.reflect.Array;
  31 import java.lang.reflect.Modifier;
  32 import java.lang.reflect.Proxy;
  33 import java.security.AccessControlContext;
  34 import java.security.AccessController;
  35 import java.security.PrivilegedAction;
  36 import java.security.PrivilegedActionException;
  37 import java.security.PrivilegedExceptionAction;
  38 import java.util.Arrays;
  39 import java.util.HashMap;
  40 import java.util.Objects;
  41 import java.util.concurrent.ConcurrentHashMap;
  42 import java.util.concurrent.ConcurrentMap;
  43 
  44 import static java.io.ObjectStreamClass.processQueue;
  45 
  46 import sun.misc.SharedSecrets;
  47 import sun.misc.ObjectInputFilter;
  48 import sun.misc.ObjectStreamClassValidator;
  49 import sun.misc.SharedSecrets;
  50 import sun.reflect.misc.ReflectUtil;
  51 import sun.misc.JavaOISAccess;
  52 import sun.util.logging.PlatformLogger;
  53 
  54 /**
  55  * An ObjectInputStream deserializes primitive data and objects previously
  56  * written using an ObjectOutputStream.
  57  *
  58  * <p>ObjectOutputStream and ObjectInputStream can provide an application with
  59  * persistent storage for graphs of objects when used with a FileOutputStream
  60  * and FileInputStream respectively.  ObjectInputStream is used to recover
  61  * those objects previously serialized. Other uses include passing objects
  62  * between hosts using a socket stream or for marshaling and unmarshaling
  63  * arguments and parameters in a remote communication system.
  64  *
  65  * <p>ObjectInputStream ensures that the types of all objects in the graph
  66  * created from the stream match the classes present in the Java Virtual




  26 package java.io;
  27 
  28 import java.io.ObjectStreamClass.WeakClassKey;
  29 import java.lang.ref.ReferenceQueue;
  30 import java.lang.reflect.Array;
  31 import java.lang.reflect.Modifier;
  32 import java.lang.reflect.Proxy;
  33 import java.security.AccessControlContext;
  34 import java.security.AccessController;
  35 import java.security.PrivilegedAction;
  36 import java.security.PrivilegedActionException;
  37 import java.security.PrivilegedExceptionAction;
  38 import java.util.Arrays;
  39 import java.util.HashMap;
  40 import java.util.Objects;
  41 import java.util.concurrent.ConcurrentHashMap;
  42 import java.util.concurrent.ConcurrentMap;
  43 
  44 import static java.io.ObjectStreamClass.processQueue;
  45 

  46 import sun.misc.ObjectInputFilter;
  47 import sun.misc.ObjectStreamClassValidator;
  48 import sun.misc.SharedSecrets;
  49 import sun.reflect.misc.ReflectUtil;
  50 import sun.misc.JavaOISAccess;
  51 import sun.util.logging.PlatformLogger;
  52 
  53 /**
  54  * An ObjectInputStream deserializes primitive data and objects previously
  55  * written using an ObjectOutputStream.
  56  *
  57  * <p>ObjectOutputStream and ObjectInputStream can provide an application with
  58  * persistent storage for graphs of objects when used with a FileOutputStream
  59  * and FileInputStream respectively.  ObjectInputStream is used to recover
  60  * those objects previously serialized. Other uses include passing objects
  61  * between hosts using a socket stream or for marshaling and unmarshaling
  62  * arguments and parameters in a remote communication system.
  63  *
  64  * <p>ObjectInputStream ensures that the types of all objects in the graph
  65  * created from the stream match the classes present in the Java Virtual


< prev index next >