This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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.



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

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:
subject: Problem using ObjectOutputStreams writeObject(), heeelp.
Similar Threads
Serialized object is not tranfering data between client and server
Working with BLOB in Oracle and Java using hibernate
Socket writeObject() doesnt seem to work, heeelp!
Pass objects through form submit
Reseting socket after few seconds