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
Modifier and TypeMethodDescriptionload(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 Details
-
save
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
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
-