< prev index next >

src/java.corba/share/classes/com/sun/corba/se/impl/io/OutputStreamHook.java

Print this page




  40 import java.util.HashMap;
  41 
  42 import org.omg.CORBA.INTERNAL;
  43 
  44 public abstract class OutputStreamHook extends ObjectOutputStream
  45 {
  46     private HookPutFields putFields = null;
  47 
  48     /**
  49      * Since ObjectOutputStream.PutField methods specify no exceptions,
  50      * we are not checking for null parameters on put methods.
  51      */
  52     private class HookPutFields extends ObjectOutputStream.PutField
  53     {
  54         private Map<String,Object> fields = new HashMap<>();
  55 
  56         /**
  57          * Put the value of the named boolean field into the persistent field.
  58          */
  59         public void put(String name, boolean value){
  60             fields.put(name, new Boolean(value));
  61         }
  62 
  63         /**
  64          * Put the value of the named char field into the persistent fields.
  65          */
  66         public void put(String name, char value){
  67             fields.put(name, new Character(value));
  68         }
  69 
  70         /**
  71          * Put the value of the named byte field into the persistent fields.
  72          */
  73         public void put(String name, byte value){
  74             fields.put(name, new Byte(value));
  75         }
  76 
  77         /**
  78          * Put the value of the named short field into the persistent fields.
  79          */
  80         public void put(String name, short value){




  40 import java.util.HashMap;
  41 
  42 import org.omg.CORBA.INTERNAL;
  43 
  44 public abstract class OutputStreamHook extends ObjectOutputStream
  45 {
  46     private HookPutFields putFields = null;
  47 
  48     /**
  49      * Since ObjectOutputStream.PutField methods specify no exceptions,
  50      * we are not checking for null parameters on put methods.
  51      */
  52     private class HookPutFields extends ObjectOutputStream.PutField
  53     {
  54         private Map<String,Object> fields = new HashMap<>();
  55 
  56         /**
  57          * Put the value of the named boolean field into the persistent field.
  58          */
  59         public void put(String name, boolean value){
  60             fields.put(name, value);
  61         }
  62 
  63         /**
  64          * Put the value of the named char field into the persistent fields.
  65          */
  66         public void put(String name, char value){
  67             fields.put(name, new Character(value));
  68         }
  69 
  70         /**
  71          * Put the value of the named byte field into the persistent fields.
  72          */
  73         public void put(String name, byte value){
  74             fields.put(name, new Byte(value));
  75         }
  76 
  77         /**
  78          * Put the value of the named short field into the persistent fields.
  79          */
  80         public void put(String name, short value){


< prev index next >