Me and a group of friends are working on a project in Java, and we need some help regarding sending objects through sockets.
So far, we have achieved to send simple
on each node you can use writeObject() and readObject() check http://java.sun.com/developer/technicalArticles/Programming/serialization/ for more info
essentially it will become
public Node implements Serializable{
transient BufferedImage buff;//transient make it so it won't be written with defaultWriteObject (which would error)
private void writeObject(ObjectOutputStream out)throws IOException{
out.defaultWriteObject();
//write buff with imageIO to out
}
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException{
in.defaultReadObject();
//read buff with imageIO from in
}
}