Sending Object over socket

It is possible to send an object over socket?

i've tryed with ObjectOutputStrem and ObjectInputStream but when i try to send an object

Object p=New Protocol("bla")

it fails.

[200 byte] By [Babicaa] at [2007-11-27 10:25:19]
# 1

It certainly is possible.

BigDaddyLoveHandlesa at 2007-7-28 17:32:58 > top of Java-index,Java Essentials,New To Java...
# 2

implements Serializable

TuringPesta at 2007-7-28 17:32:58 > top of Java-index,Java Essentials,New To Java...
# 3

> It is possible to send an object over socket?

>

> i've tryed with ObjectOutputStrem and

> ObjectInputStream but when i try to send an object

>

> Object p=New Protocol("bla")

>

And how does that irrelevent snippet of code tell us anything at all.

Try posting you relevent code (USE THE CODE TAGS PLEASE) and the error message you got.

cotton.ma at 2007-7-28 17:32:58 > top of Java-index,Java Essentials,New To Java...
# 4

... and how does just saying 'it fails' tell us anything either?

ejpa at 2007-7-28 17:32:58 > top of Java-index,Java Essentials,New To Java...
# 5

Give the stacktrace of your program. You can send objects using sockets as long as your object's class implements serializable and the non serializable stuff as transient.

Brucesworda at 2007-7-28 17:32:58 > top of Java-index,Java Essentials,New To Java...