/[classpath]/classpath/java/io/ObjectOutputStream.java
ViewVC logotype

Diff of /classpath/java/io/ObjectOutputStream.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37 by tromey, Fri Aug 1 03:33:59 2003 UTC revision 1.38 by iproetel, Tue Aug 12 09:36:31 2003 UTC
# Line 361  public class ObjectOutputStream extends Line 361  public class ObjectOutputStream extends
361            }            }
362          catch (IOException ioe)          catch (IOException ioe)
363            {            {
364              throw new StreamCorruptedException ("Exception " + ioe + " thrown while exception was being written to stream.");              throw new StreamCorruptedException ("Exception " + ioe + " thrown while exception ("+e+") was being written to stream.");
365            }            }
366    
367          reset (true);          reset (true);
# Line 443  public class ObjectOutputStream extends Line 443  public class ObjectOutputStream extends
443        throw new NotActiveException ("defaultWriteObject called by non-active class and/or object");        throw new NotActiveException ("defaultWriteObject called by non-active class and/or object");
444    
445      if (fieldsAlreadyWritten)      if (fieldsAlreadyWritten)
446        throw new IOException ("Only one of putFields and defaultWriteObject may be called, and it may only be called once");        throw new IOException ("Only one of writeFields and defaultWriteObject may be called, and it may only be called once");
447    
448      fieldsAlreadyWritten = true;      fieldsAlreadyWritten = true;
449    }    }
# Line 866  public class ObjectOutputStream extends Line 866  public class ObjectOutputStream extends
866    
867    public PutField putFields () throws IOException    public PutField putFields () throws IOException
868    {    {
869      markFieldsWritten ();      if (currentPutField == null)
870          {
871      currentPutField = new PutField ()      currentPutField = new PutField ()
872        {        {
873          private byte[] prim_field_data          private byte[] prim_field_data
# Line 1002  public class ObjectOutputStream extends Line 1002  public class ObjectOutputStream extends
1002          }          }
1003        };        };
1004      // end PutFieldImpl      // end PutFieldImpl
1005          }
1006    
1007      return currentPutField;      return currentPutField;
1008    }    }
# Line 1012  public class ObjectOutputStream extends Line 1013  public class ObjectOutputStream extends
1013      if (currentPutField == null)      if (currentPutField == null)
1014        throw new NotActiveException ("writeFields can only be called after putFields has been called");        throw new NotActiveException ("writeFields can only be called after putFields has been called");
1015    
1016            // moved here from putFields since putFields
1017            // may be called more than once, but not writeFields
1018            markFieldsWritten();
1019            
1020      currentPutField.write (this);      currentPutField.write (this);
1021        currentPutField = null;
1022    }    }
1023    
1024    
# Line 1248  public class ObjectOutputStream extends Line 1254  public class ObjectOutputStream extends
1254        }        }
1255      catch (Exception _)      catch (Exception _)
1256        {        {
1257          throw new IOException ();          throw new IOException ("Unexpected Exception "+_);
1258        }            }    
1259    }    }
1260    
# Line 1263  public class ObjectOutputStream extends Line 1269  public class ObjectOutputStream extends
1269        }        }
1270      catch (Exception _)      catch (Exception _)
1271        {        {
1272          throw new IOException ();          throw new IOException ("Unexpected Exception "+_);
1273        }            }    
1274    }    }
1275    
# Line 1278  public class ObjectOutputStream extends Line 1284  public class ObjectOutputStream extends
1284        }        }
1285      catch (Exception _)      catch (Exception _)
1286        {        {
1287          throw new IOException ();          throw new IOException ("Unexpected Exception "+_);
1288        }            }    
1289    }    }
1290    
# Line 1293  public class ObjectOutputStream extends Line 1299  public class ObjectOutputStream extends
1299        }        }
1300      catch (Exception _)      catch (Exception _)
1301        {        {
1302          throw new IOException ();          throw new IOException ("Unexpected Exception "+_);
1303        }            }    
1304    }    }
1305    
# Line 1308  public class ObjectOutputStream extends Line 1314  public class ObjectOutputStream extends
1314        }        }
1315      catch (Exception _)      catch (Exception _)
1316        {        {
1317          throw new IOException ();          throw new IOException ("Unexpected Exception "+_);
1318        }            }    
1319    }    }
1320    
# Line 1323  public class ObjectOutputStream extends Line 1329  public class ObjectOutputStream extends
1329        }        }
1330      catch (Exception _)      catch (Exception _)
1331        {        {
1332          throw new IOException ();          throw new IOException ("Unexpected Exception "+_);
1333        }            }    
1334    }    }
1335    
# Line 1338  public class ObjectOutputStream extends Line 1344  public class ObjectOutputStream extends
1344        }        }
1345      catch (Exception _)      catch (Exception _)
1346        {        {
1347          throw new IOException ();          throw new IOException ("Unexpected Exception "+_);
1348        }            }    
1349    }    }
1350    
# Line 1353  public class ObjectOutputStream extends Line 1359  public class ObjectOutputStream extends
1359        }        }
1360      catch (Exception _)      catch (Exception _)
1361        {        {
1362          throw new IOException ();          throw new IOException ("Unexpected Exception "+_);
1363        }            }    
1364    }    }
1365    
# Line 1369  public class ObjectOutputStream extends Line 1375  public class ObjectOutputStream extends
1375        }        }
1376      catch (Exception _)      catch (Exception _)
1377        {        {
1378          throw new IOException ();          throw new IOException ("Unexpected Exception "+_);
1379        }            }    
1380    }    }
1381    

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26