示例#1
0
 /**
  * Writes the state of this object to the stream passed.
  *
  * @param out
  *            the stream to write the state to.
  * @throws IOException
  *             if the stream throws it during the write.
  * @serialData {@code int} - the length of this object. {@code char[]} - the
  *             buffer from this object, which may be larger than the length
  *             field.
  */
 private void writeObject(java.io.ObjectOutputStream outJ)
 {
     // throws IOException {
     outJ.defaultWriteObject();
     outJ.writeInt(length());
     outJ.writeObject(getValue());
 }
 /**
  * Writes the data necessary for <code>put()</code> to work in deserialization.
  */
 protected virtual void dowriteObject(java.io.ObjectOutputStream outJ)
 {
     //throws IOException {
     outJ.writeInt(maxSizeJ);
     base.doWriteObject(outJ);
 }
示例#3
0
 /*
  * Customized serialization.
  */
 private void writeObject(java.io.ObjectOutputStream outJ)
 {
     // throws IOException {
     outJ.defaultWriteObject();
     outJ.writeByte(MAJOR);
     outJ.writeByte(MINOR);
     if (null == parameters) {
     outJ.writeInt(-1);
     } else {
     outJ.writeInt(parameters.Length);
     foreach (Object element in parameters) {
         outJ.writeObject(null == element ? null : element.toString());
     }
     }
 }
 public override void writeExternal(java.io.ObjectOutput outJ)
 {
     //throws IOException {
     outJ.writeInt(maximumSize);
     outJ.writeInt(size());
     for (java.util.Iterator<Object> iterator = keySet().iterator(); iterator.hasNext(); )
     {
         Object key = iterator.next();
         outJ.writeObject(key);
         // be sure to call super.get(key), or you're likely to
         // get infinite promotion recursion
         Object value = base.get(key);
         outJ.writeObject(value);
     }
 }