public void writeToStream(final ByteArrayOutputStream bos) throws IOException {
  final ObjectOutput os=new ObjectOutputStream(bos);
  os.writeObject(max_size);
  for (int i=0; i < max_size; i++) {
    final Area nextObj=items[i];
    if (nextObj == null) {
      os.writeObject(null);
    }
 else {
      final PathIterator pathIterator=nextObj.getPathIterator(new AffineTransform());
      PathSerializer.serializePath(os,pathIterator);
    }
  }
}

public void writeToStream ( final ByteArrayOutputStream bos ) throws IOException { final ObjectOutput os = new ObjectOutputStream ( bos ) ; os . writeObject ( max_size ) ; for ( int i = 0 ; i < max_size ; i ++ ) { final Area nextObj = items [ i ] ; if ( nextObj == null ) { os . writeObject ( null ) ; } else { final PathIterator pathIterator = nextObj . getPathIterator ( new AffineTransform ( ) ) ; PathSerializer . serializePath ( os , pathIterator ) ; } } }
writes out the shapes in this collection to the bytearrayoutputstream not part of api and subject to change ( do not use )
