public File encode(Serializable structure, File file, Map parameters) {
		try {
			ObjectOutputStream stream = new ObjectOutputStream(
					new BufferedOutputStream(new FileOutputStream(file)));
			stream.writeObject(structure);
			stream.flush();
			stream.close();
			return file;
		} catch (NotSerializableException e) {
			throw new EncodeException("Object Not Serializable");
		} catch (IOException e) {
			throw new EncodeException("Could not open file to write!");
		}
	}