[Date Prev][Date Next] [Chronological] [Thread] [Top]

Get binary with JNDI - maybe OT



I have a directory where are save file in different formats.
In the beginning I use datahandler, after convert to byte[] and save on LDAP.
When I try to get with:
answer = ctx.getAttributes(rni,attr).get("dataBinary");
byte[] resultByte = ((byte[])answer.get());

I obtain cast exception, why?
If data are text file and I made a string cast I see it correctly.
Sorry for my English,
Thanks,

~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~