package aalg.mailer;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class CommandStorNot implements ICommand {

	private EncryptedNotification notification;

	@Override
	public void write(final OutputStream stream) throws IOException {
		notification.write (stream);
	}

	@Override
	public void read(final InputStream stream) throws IOException {
		notification = new EncryptedNotification();
		notification.read(stream);
	}

	@Override
	public void execute(final CommandContext context) {
		context.getDatabase().storeNotification (notification);
	}
	
	
}
