public void writeGraphics(ObjectOutputStream objectstream) throws IOException {
synchronized (graphics) {
    for (Iterator<OMGraphic> it=iterator(); it.hasNext(); ) {
      OMGraphic g=it.next();
      try {
        objectstream.writeObject(g);
      }
 catch (      IOException e) {
        Debug.error("OMGraphicList: Couldn't write object " + g + "\nOMGraphicList: Reason: "+ e.toString());
      }
    }
  }
  objectstream.close();
}

public void writeGraphics ( ObjectOutputStream objectstream ) throws IOException { synchronized ( graphics ) { for ( Iterator < OMGraphic > it = iterator ( ) ; it . hasNext ( ) ; ) { OMGraphic g = it . next ( ) ; try { objectstream . writeObject ( g ) ; } catch ( IOException e ) { Debug . error ( "OMGraphicList: Couldn't write object " + g + "\nOMGraphicList: Reason: " + e . toString ( ) ) ; } } } objectstream . close ( ) ; }
write the graphics out to a objectoutputstream
