Package spoon.reflect
Interface ModelStreamer
-
- All Known Implementing Classes:
SerializationModelStreamer
public interface ModelStreamer
This interface defines the protocol to save and load a factory and it's associated model through output and input streams.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Factory
load(InputStream in)
Loads a factory (and all its associated Java program elements).void
save(Factory f, OutputStream out)
Saves a factory (and all its associated Java program elements).
-
-
-
Method Detail
-
save
void save(Factory f, OutputStream out) throws IOException
Saves a factory (and all its associated Java program elements). Stream is GZIP compressed by default, seeEnvironment.setCompressionType(spoon.support.CompressionType)
- Parameters:
f
- the factory to be saveout
- the used output stream- Throws:
IOException
- if some IO error occurs
-
load
Factory load(InputStream in) throws IOException
Loads a factory (and all its associated Java program elements). Tries to decompress the file given the availableCompressionType
- Parameters:
in
- the used input stream- Returns:
- the loaded factory
- Throws:
IOException
- if some IO error occurs
-
-