java/ch/wlkl/wsh/OpenClose.java
package ch.wlkl.wsh;
public interface OpenClose {
/**
* redefine the receiver by args.
* After reset the receiver should be initialised to args as after new...(args).
* If the receiver is open, reset should close it before reinitialising.
* @param args the specification for the next open
*/
public void reset(Object... args);
/**
* open the receiver for read or write.
* If already open, close it first.
* @param opt the first character means the following:
* <br><ul>
* <li> "r" open for read
* <li> "w" open for write, erase previous content
* <li> "a" open for write, append to previous content
* </ul>an implementation may only support a part of these possiblities or add further ones.
*/
public void open(String opt);
/**
* close the receiver.
* if not open do nothing.
*/
public void close();
}