samer@0: package samer.core; samer@0: samer@0: import java.io.*; samer@0: samer@0: /** Interface for objects that can be saved in samer@0: binary or text format. Don't need to implement all samer@0: methods, eg if no binary format. Just throw an exception samer@0: instead. */ samer@0: samer@0: public interface Saveable { samer@0: void load(InputStream in) throws Exception; samer@0: void save(OutputStream out) throws Exception; samer@0: void read(Reader rdr) throws Exception; samer@0: void write(Writer wr) throws Exception; samer@0: }