| The Essential JViews Framework > Managers > Saving and Reading |
Saving and Reading |
INDEX
PREVIOUS
NEXT
|
The manager provides facilities to save its contents to a file. The resulting file is an ASCII or binary file in the .ivl format that contains information about the layers and the graphic objects. The saving methods are as follows:
void write(OutputStream stream, boolean binary) throws IOException void write(String filename) throws IOException void write(String filename, boolean binary) throws IOException
You can save data in either an ASCII or binary file, the binary format being, however, more compact and faster to read than the ASCII format.
void read(InputStream stream) throws IOException, IlvReadFileException void read(String filename) throws IOException, IlvReadFileException void read(URL url) throws IOException, IlvReadFileException
The read methods may throw an exception in the following situations:
Whether the .ivl file is an ASCII or binary file is detected automatically by the read methods.
You can save/read the information on your own graphic objects by providing the appropriate methods when creating your own graphic object class. For more information, see Input/Output Operations and also Saving and Loading the Object Description.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |