Problem in writing a file in binary format
Hello All,
I am having a problem in writing a file which is not a text file and when i try to write some non text data (bytes) into that file using "utl_file.put" or "utl_file.put_line" funtions of Package UTL_FILE. They write those bytes in the character format and that is the main problem with my procedure.
My Requirement is as follows:
Actually i have BLOB field in a table which contain the image (.jpg) file and now i want to save that that image file somewhere in my server hardisk. For this purpose i am reading the BLOB in Bytes using "DBMS_LOB.READ" and saving that bytes in a RAW Buffer. After reading the bytes from BLOB, i am creating a ".jpg" file using UTL_FILE.FOPEN and also writing the bytes in buffer into that file created using "UTL_FILE.PUT" . Now the problem is that UTL_FILE.PUT write the data in the character format & i want to write those bytes as it is or in binary format.
Plz tell me that is there any other package available or any other method available through which i can write a BINARY data to file.
Plz tell me about this as soon as possible.
Thanks in Advance.
Regards,
Omer.