Recreating attachment file

Hi,

I want to read the information from the ‘attachments’ table in the database
and recreate a copy of the files stored there through a Java program. Any
pointers for how to go about this will be of great help!

Thanks and regards

-Ashish