File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes Problem using ObjectOutputStreams writeObject(), heeelp. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply locked New topic

Problem using ObjectOutputStreams writeObject(), heeelp.

Dominic Steng�rd
Ranch Hand

Joined: Feb 05, 2001
Posts: 186
When I call networkOut.writeObject(storage) bellow nothing happens. No exception or nothing, the program just seems to freeze at this point. The storage object contains a byte [] array with a soundsnippet recorded from the computers microphone.

Any thought will be appreciated, since Im clueless.
Thanks in advance.



public class OutputThread implements Runnable {

private Socket socket;
private ObjectOutputStream networkOut;
private ByteArrayOutputStream bA;
private Storage storage;
private Uppgift6_2_1 p;

public OutputThread(Socket socket, ByteArrayOutputStream bA, Uppgift6_2_1 p) {
this.socket = socket;
this.bA = bA;
this.p = p;
storage = new Storage(bA);

public void run() {
try {
networkOut = new ObjectOutputStream(socket.getOutputStream());
catch(IOException e) {

Dominic Steng�rd<br />Sun Certified Java 2 Programmer
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Please do not crosspost your questions to more than one forum.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Problem using ObjectOutputStreams writeObject(), heeelp.
jQuery in Action, 3rd edition