Im sending a object over a socket, an object of the following class:
public class ClientDetail implements Serializable{
public String username;
public String [] capturedText;
public String site;
public BufferedImage screenShot;
}
and I am trying to send it using the following:
ClientDetail cD = new ClientDetail();
cD.capturedText = mon.getCapturedText();
cD.username = username;
cD.site = mon.getWebsite();
ScreenShot ss = new ScreenShot();
cD.screenShot = ss.getScreenShot();
if(mon.isCaptured)
{
try{
output.writeObject(cD);
output.flush();
}catch(IOException ex){
System.out.println("\nSomething messed up sending the message!");
}
}
This is failing to send. Can you send an object that contains a image over a socket?