Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to convert oracle BLOB to String

807588Apr 20 2008 — edited Feb 2 2009
Hi,

I am working on an GIS project using Oracle database which stores the spatial data. When I read the polygon points data which is saved as BLOB type in database table and convert the BLOB to byte[], there is no problem. However when the data is converted to Character, those characters are not recognized something like this:
�����������?�����?���w�����������������!����?o����s��8��n�����H��?
������������������ �?&�?�����|��?��������?���������������L�?


This is the method I used to convert BLOB to String below:
-----mapb is the BLOB instance.

byte[] images = mapb.getBytes(1,(int)mapb.length());
String newstring = new String(images);

Is that decoding problem?
Can somebody help me for this problem?

Thanks in advance!

XR
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2009
Added on Apr 20 2008
13 comments
2,944 views