Hi,

Am Mittwoch, den 12.09.2007, 20:22 +0700 schrieb Hendrik Beck (camunda):
>   String value = new String(byte[]) propValue);
>   valueFactory.createValue(value);

Isn't this wrong anyway ? If we convert the binary data to String at
all, we should use ISO-8859-1 as the charset to ensure identity
conversion. But this seems somewhat strange as the data actually really
is binary so, we should do

   InputStream ins = new ByteArrayInputStream((byte[]) propValue);
   valueFactory.createValue(ins);

Likewise reading the value would consist of reading the value as a
stream into a byte[] and return that array.

What do you think ?

Regards
Felix

> 
> Is it possible that this operation is being done using the wrong charset for
> my file?
> 
> Well, that's just a wild guess, I could honestly be totally wrong. I would
> be thankful for any pointers. Are there people doing the same, like storing
> binaries with OCM using byte[] for the jcr:data? Am I missing something?
> 
> 
> Thanks in advance
> Hendrik
> 
> 

Reply via email to