From Array of double to Binary Base 64 String

Hi all!

I need to create the content of a xml tag includingBinary Base 64 String created froman array of double specifyingprecision andendian attributes, any hint?

E.g.

array [0]=23.4;

array [1]=213.4;

array [2]=233.49;

array [3]=231.43;

<data precision="32" length="134" endian="little">340vRFMLMESokDBEVxAxRHOQMUQLDDJEQ5IyRLvNMkRjUDNEtdIzRGNRNETg0TREaVA1RJHPNUTXTjZE/s42RN9TN0Rx3jdE2pM4RFcUOUQPkzlELhI6RLGMOkQCHDtEghJAROabQERiDEJE/ZpCRAgRRESKUUVEHthFRNEVRkQb1UZEmFNHRNTZR0RUV0lEWNZJREFXSkSSzkpE2FVLRBiaS0T6EUxEaI9MRFzNTURrFk9EYJhPRM7YT0SMWlBEt89QREaYUkQKS1NE7RVURNRXVUQ1E1dEcIxXRG4YWERCllhEUcxYRAzaWUSK2VpEKk5bRNedXESsWl9Eq91fRCdYYET0WGFEwtFjRPFUZERJ2mVE7VxoRBKbaURQYGtE26JtREIdbkQtG29EyaBvRBvicESZXXNEh95zRKgZdkRbmnpEECd9RPQrgUSwZ4FEtq6BRBbugUQ01YdEchmVRHb4nkR0hp9EMxyqRLCsqkRLEqtEDXmrROxdrERKMq1ERpetRPLerUQARK5Emx2vRA+er0QY3LFEWj20RLPYu0QEYbxESvq8REFAvUT81L1EeN/IRBigyUSJWspE/xPLRKQ7zETYms9EOv3RROk91UQRpd9ERLzgRFTf4UR3/uJEBLzlRFZ+50QPw+dES1npRE6k60S8P+1El2DuRFkk8kQDpfZECcb3RHvD/USUxv5En1IARYPkA0U=</data>

Thanks!

[1118 byte] By [tlloretia] at [2007-11-27 9:07:54]
# 1
I don't see this as an encryption problem.Write each double to a DataOutputStream which is chained to a ByteArrayOutputStream. Then Base64 encode the content of the ByteArrayoutputStream and use the result in your XML.
sabre150a at 2007-7-12 21:45:14 > top of Java-index,Security,Cryptography...
# 2
Thanks a lot for your answer!And how can I set precision and endian?Regards,
tlloretia at 2007-7-12 21:45:14 > top of Java-index,Security,Cryptography...
# 3

> Thanks a lot for your answer!

>

> And how can I set precision and

> endian?

>

If you look at the methods of DataOutputStream you will see that they defaults to 'big endian' and since a double is held in 64 bits I suggest this is the value for 'precision' but since you have not defined how it is defined I am just guessing.

sabre150a at 2007-7-12 21:45:14 > top of Java-index,Security,Cryptography...