I'm trying to write a HashMap with the FileOutputStream. This is what my code looks like.
public class ObjectStream implements Serializable{
public void serialize(HashMap<String, Mat> obj){
try {
FileOutputStream fileOut = new FileOutputStream("C:\\Users\\Juergen\\fileoutputstream.txt");
ObjectOutputStream out = new ObjectOutputStream(fileOutput);
out.write(obj);
out.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
The Problem is that the "write" function is not applicable for the argument. What can i do?Thanks