Sockets: sending structured data
As I understand, java sockets are able to send strings only.
I was wondering if java api have a class or something that allow me to send structured data.
Is there a native way in java api to send structured data over a network, i.e. without the need to parse myself string messages ?
Thanks.
# 4
mmm... I dont know really. That was long time ago. What matters anyway is that sockets can send only sequences of bytes.
Serialization is the perfect solution, though.
Thank you all.
# 5
> mmm... I dont know really. That was long time ago.
> What matters anyway is that sockets can send only
> sequences of bytes.
As opposed to what exactly?
What is stored on hard drives? bytes. What do you send through sockets? bytes.
If I were you I'd stop and make sure I knew what I was doing before I went much further because you seem a bit lost.
# 6
>
> Serialization is the perfect solution, though.
>
And actually I kind of doubt this. Serialization may be what you need but I wouldn't say it's a perfect solution because there a bunch of problems it can create that you can avoid by doing other things.