I am writing a Java code to read Blob objects from an Oracle database table.
I need to retrieve the blob objects and store them into a String for further processing. I convert the blob objects contents to String by this :
java.sql.Blob blob = rs.getBlob(i); columnValue = new String(blob.getBytes(1l, (int) blob.length()));
However when I try to parse the resultant string, I get errors which say "Not a valid escape sequence" because apparently the Blob data consists of some data like \x, \i or something !
Is there a way to make Java ignore these escape sequences and make it to just consider the string with its contents as it is (i.e Strings containing \x, \i etc.) ?