jQuery in Action, 2nd edition*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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.


import java.io.*;
import java.net.*;

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: 8834

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

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
I agree. Here's the link: http://aspose.com/file-tools
subject: Problem using ObjectOutputStreams writeObject(), heeelp.
Similar Threads
Socket writeObject() doesnt seem to work, heeelp!
Pass objects through form submit
Reseting socket after few seconds
Working with BLOB in Oracle and Java using hibernate
Serialized object is not tranfering data between client and server