From: Florian R. <fl...@eb...> - 2009-06-15 16:06:57
|
Hi Angel, yes, thanks! I did not take into account that JAXB is clever and already does the base64 decoding! That is why I got troubles trying to decode (the already decoded) byte[]... I am also using the Inflater/Deflater for the compression and that works fine. Thanks a lot for pointing that out! Florian Angel Pizarro wrote: > OK, so think I am reading this completely wrong, but isn't the default JAXB > base64binary to byte[] decoding preserve the zlib compression, resulting in > a byte[] that is still zlib compressed? If so the java.util.zip.Inflater > should handle this correctly to deflate the byte[] before translating it > into Float[], int[] whatever. > My AS3 parser (soon to be released) encounters the same issue and I also > have deflate the byte[] before reading into an Array of Number (same data > type for double or float in AS3). > > Am I missing something? -angel > > On Mon, Jun 15, 2009 at 10:45 AM, Florian Reisinger <fl...@eb...>wrote: > >> Hi Matt, >> >> maybe I did not express myself well enough. >> >> We do have methods that take care of converting the data from the base64 >> encoded XML data into a >> more convenient double[] in Java. Taking into account the CVParams for >> precision and compression, >> this will actually hold double or float values. The user can then check if >> the actual data contained >> in the array is in double or float values... >> (I still have to cater for the int and String representations, though) >> >> >> But what I am having trouble with is the data I read from an existing mzML >> file. We used the default >> JAXB generated mapping and the data stored by the Unmarshaller in the >> mapped byte[] variable does >> not seem to be base64 encoded. It seems the data in the XML is not >> correctly converted into the Java >> byte[], which renders my attempts to base64-decode it useless. >> >> With the changes I mentioned to the XML schema, the mapping changes and the >> data is now unmarshalled >> into a String variable. The byte[] obtained from this String is base64 >> encoded and if converted into >> double/float I get reasonable values... >> >> >> Cheers, >> Florian >> >> >> >> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > > > ------------------------------------------------------------------------ > > _______________________________________________ > Psidev-ms-dev mailing list > Psi...@li... > https://lists.sourceforge.net/lists/listinfo/psidev-ms-dev |