jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendrik Beck \(camunda\)" <hendrik.b...@camunda.com>
Subject RE: [OCM] Binary values from byte[] field
Date Wed, 12 Sep 2007 14:09:27 GMT
Hi,

I am just trying out that approach, it sounds promising to me. I would let
you know if I had any success as soon as my build is finished and I tested
it again, ok?

Regards and thanks again
Hendrik


> -----Original Message-----
> From: Felix Meschberger [mailto:fmeschbe@gmail.com]
> Sent: Wednesday, September 12, 2007 8:55 PM
> To: users@jackrabbit.apache.org
> Subject: Re: [OCM] Binary values from byte[] field
> 
> 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
> >
> >



Mime
View raw message