void write(Cospan cospan, String filename) throws FileNotFoundException, IOException
filename
.cospan
- the cospan to be writtenfilename
- the filename of the file to which the cospan is writtenFileNotFoundException
- thrown if the file exists but is a directory rather than a
regular file, does not exist but cannot be created, or cannot be opened for any other reasonIOException
- thrown if an I/O error occurs while writing the automaton