Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

Question about Oracle BLOBs and encoding

Thread view: 
GaryM - 05 Jun 2006 13:40 GMT
I am working with a 3rd party application that provides its own
public APIs for accessing its data. Included is an implementation of
a database ResultSet. The object provides a method for getting a
BLOB:

ByteArrayInputstream getBlob(int)

BLOBs are persisted in an Oracle 9i Database as LONG RAW types.

The problem I am encountering is related to the retrieving of a CSV
file using the code below.

ByteArrayInputStream blob = null;
...
get the blob from the db
...
csvFile = new BufferedReader(new InputStreamReader(blob));

In 3 out of 4 implementations this works fine, but in one it returns
garbage. I am told by the DBA that the 4th database is configured
identically to the others.

The content should be US-ASCII but I get mostly non-ASCII back and
actually mentions of "Adobe Photoshop CS Macintosh" in the middle of
it. This makes me think the wrong memory is being read or something.

I have tried creating the InputStreamReader with different named
charsets with no success, so I was hoping someone might have a few
more pointers as to what might be going wrong, or things to check.

Thanks in advance,

Gary
Chris Uppal - 06 Jun 2006 09:27 GMT
> In 3 out of 4 implementations this works fine, but in one it returns
> garbage. I am told by the DBA that the 4th database is configured
[quoted text clipped - 3 lines]
> actually mentions of "Adobe Photoshop CS Macintosh" in the middle of
> it. This makes me think the wrong memory is being read or something.

You have checked that the data /in/ the database is OK ?

Might also be worth checking environment settings on both the machine which
issues the query and the one which answers it (assuming they are different
machines).

   -- chris


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.