package aalg.mailer;

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

import aalg.algebra.Utils;
import aalg.algebra.VariableNumberIo;

public class EncryptedNotification implements IPersistable
{
	private byte[] data;

	@Override
	public void write(final OutputStream stream) throws IOException {
		VariableNumberIo.writeInt(data.length, stream);
	}

	@Override
	public void read(final InputStream stream) throws IOException {
		final int length = VariableNumberIo.readInt(stream);
		data = Utils.readByteArray(stream, length);
	}
	
	
}
