KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > ModelStreamer


1 package spoon.reflect;
2
3 import java.io.IOException JavaDoc;
4 import java.io.InputStream JavaDoc;
5 import java.io.OutputStream JavaDoc;
6
7
8
9 /**
10  * This interface defines the protocol to save and load a factory and it's
11  * associated model through ouput and input streams.
12  */

13 public interface ModelStreamer {
14
15     /**
16      * Saves a factory (and all its associated Java program elements).
17      *
18      * @param f
19      * the factory to be save
20      * @param out
21      * the used output stream
22      * @throws IOException
23      * if some IO error occurs
24      */

25     void save(Factory f, OutputStream JavaDoc out) throws IOException JavaDoc;
26
27     /**
28      * Loads a factory (and all its associated Java program elements).
29      *
30      * @param in
31      * the used input stream
32      * @return the loaded factory
33      * @throws IOException
34      * if some IO error occurs
35      */

36     Factory load(InputStream JavaDoc in) throws IOException JavaDoc;
37
38 }
Popular Tags