Board index » jbuilder » Serialization / De-Serialization (from memory)

Serialization / De-Serialization (from memory)


2004-01-21 08:18:25 PM
jbuilder2
Hi,
Iīm trying to use Serialization for a CORBA application, but I donīt have
any idea on how to serialize / deserialize a value that comes from a
parameter.
On CORBA I must use "byte" that is equivalent to "octet (on IDL)" to
transfer serialized objects. But I donīt know how to get an object (from a
Vector for instance) and serialize it to a byte variable.
I saw examples on serialization, but all of them uses a file where it saves
/ restores the state of the object.
Does anyone has idea on how to serialize an object to a variable ?
Thanks in advance
Alessandro
--
Alessandro Fragnani de Morais
Analista de Sistemas
Softplan/Poligraph
Sistema da Qualidade Certificado ISO9001-BVQI/INMETRO
Fone/Fax: 0xx(48) 3027-8000
www.softplan.com.br
 
 

Re:Serialization / De-Serialization (from memory)

Look for the ByteInputStream and ByteOutputStream classes in java.io. You
can serialize your objects to bytes, send them over CORBA, and deserialize
them at the other end.
--
Check out our latest white papers at
www.datadevelopment.com/papers/index.html
BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server
Dolphin Data Development Ltd.
www.datadevelopment.com/
"Alessandro Fragnani de Morais" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

Iīm trying to use Serialization for a CORBA application, but I donīt have
any idea on how to serialize / deserialize a value that comes from a
parameter.

On CORBA I must use "byte" that is equivalent to "octet (on IDL)" to
transfer serialized objects. But I donīt know how to get an object (from a
Vector for instance) and serialize it to a byte variable.

I saw examples on serialization, but all of them uses a file where it
saves
/ restores the state of the object.

Does anyone has idea on how to serialize an object to a variable ?

Thanks in advance

Alessandro
--
Alessandro Fragnani de Morais
Analista de Sistemas
Softplan/Poligraph
Sistema da Qualidade Certificado ISO9001-BVQI/INMETRO
Fone/Fax: 0xx(48) 3027-8000
www.softplan.com.br


 

Re:Serialization / De-Serialization (from memory)

Kevin,
I couldnīt find ByteInputStream (in any package), but only
java.io.ByteArrayInputStream. Is this ?
Also, CORBA returns a byte, not an array of byte.. so, how it will be
serialized/de-serialized?
Do you have any sample on doing this ?? Sorry, but Iīm a kind of new on Java
(a Delphi developer for last 6 years).
Thanks in advance
Alessandro
--
Alessandro Fragnani de Morais
Analista de Sistemas
Softplan/Poligraph
Sistema da Qualidade Certificado ISO9001-BVQI/INMETRO
Fone/Fax: 0xx(48) 3027-8000
www.softplan.com.br
"Kevin Dean" < XXXX@XXXXX.COM >escreveu na mensagem
Quote
Look for the ByteInputStream and ByteOutputStream classes in java.io. You
can serialize your objects to bytes, send them over CORBA, and deserialize
them at the other end.

--
Check out our latest white papers at
www.datadevelopment.com/papers/index.html

BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server

Dolphin Data Development Ltd.
www.datadevelopment.com/

"Alessandro Fragnani de Morais" < XXXX@XXXXX.COM >wrote in
message
news: XXXX@XXXXX.COM ...
>Hi,
>
>Iīm trying to use Serialization for a CORBA application, but I donīt
have
>any idea on how to serialize / deserialize a value that comes from a
>parameter.
>
>On CORBA I must use "byte" that is equivalent to "octet (on IDL)" to
>transfer serialized objects. But I donīt know how to get an object (from
a
>Vector for instance) and serialize it to a byte variable.
>
>I saw examples on serialization, but all of them uses a file where it
saves
>/ restores the state of the object.
>
>Does anyone has idea on how to serialize an object to a variable ?
>
>Thanks in advance
>
>Alessandro
>--
>Alessandro Fragnani de Morais
>Analista de Sistemas
>Softplan/Poligraph
>Sistema da Qualidade Certificado ISO9001-BVQI/INMETRO
>Fone/Fax: 0xx(48) 3027-8000
>www.softplan.com.br
>
>


 

{smallsort}

Re:Serialization / De-Serialization (from memory)

Yes, you want the ByteArray* classes.
CORBA can handle arrays of bytes using sequence of octets. I'm afraid that
my CORBA knowledge is quite old so I can't provide an example.
--
Check out our latest white papers at
www.datadevelopment.com/papers/index.html
BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server
Dolphin Data Development Ltd.
www.datadevelopment.com/
"Alessandro Fragnani de Morais" < XXXX@XXXXX.COM >wrote in message
Quote
Kevin,

I couldnīt find ByteInputStream (in any package), but only
java.io.ByteArrayInputStream. Is this ?

Also, CORBA returns a byte, not an array of byte.. so, how it will be
serialized/de-serialized?

Do you have any sample on doing this ?? Sorry, but Iīm a kind of new on
Java
(a Delphi developer for last 6 years).

Thanks in advance

Alessandro
--
Alessandro Fragnani de Morais
Analista de Sistemas
Softplan/Poligraph
Sistema da Qualidade Certificado ISO9001-BVQI/INMETRO
Fone/Fax: 0xx(48) 3027-8000
www.softplan.com.br
"Kevin Dean" < XXXX@XXXXX.COM >escreveu na mensagem
news:400e8881$ XXXX@XXXXX.COM ...
>Look for the ByteInputStream and ByteOutputStream classes in java.io.
You
>can serialize your objects to bytes, send them over CORBA, and
deserialize
>them at the other end.
>
>--
>Check out our latest white papers at
>www.datadevelopment.com/papers/index.html
>
>BladeNET Scores With Borland Enterprise Tools
>Team Development with JBuilder and Borland Enterprise Server
>
>Dolphin Data Development Ltd.
>www.datadevelopment.com/
>
>"Alessandro Fragnani de Morais" < XXXX@XXXXX.COM >wrote in
message
>news: XXXX@XXXXX.COM ...
>>Hi,
>>
>>Iīm trying to use Serialization for a CORBA application, but I donīt
have
>>any idea on how to serialize / deserialize a value that comes from a
>>parameter.
>>
>>On CORBA I must use "byte" that is equivalent to "octet (on IDL)" to
>>transfer serialized objects. But I donīt know how to get an object
(from
a
>>Vector for instance) and serialize it to a byte variable.
>>
>>I saw examples on serialization, but all of them uses a file where it
>saves
>>/ restores the state of the object.
>>
>>Does anyone has idea on how to serialize an object to a variable ?
>>
>>Thanks in advance
>>
>>Alessandro
>>--
>>Alessandro Fragnani de Morais
>>Analista de Sistemas
>>Softplan/Poligraph
>>Sistema da Qualidade Certificado ISO9001-BVQI/INMETRO
>>Fone/Fax: 0xx(48) 3027-8000
>>www.softplan.com.br
>>
>>
>
>