Read a txt file make it a clob
843836Jun 8 2004 — edited Oct 3 2008Hello. I have a text file that I'd like to read and then set the contents to a clob value. I'm really not too familar with streams and buffers, so everything I've tried has been grasping at straws.
I've tried reading the file with a fileReader object then writing it a string and trying to convert string to clob... no go
FileReader frObject = new FileReader("d:\\jrun4\\servers\\test\\Ndadsbload1.txt");
BufferedReader brObject = new BufferedReader(frObject);
String line = brObject.readLine();
String sFile = "";
Clob clob;
while (line != null) {
sFile += line;
line = brObject.readLine();
}
I've read on clobs, and saw some on ascii streams, but I'm kinda stuck. Can anyone help me out?