You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

in the database image is defined as byte[].
I use this routine to read the image
// template routine Java
package routines;
import java.io.FileInputStream;
import java.io.File;
import java.io.FileNotFoundException;
public class ImageUtil {
public static byte[] getByte(String filepath) {
byte[] b=null;
try {
FileInputStream fis = new FileInputStream(filepath);
b=new byte[fis.available()];
fis.read(b);
} catch (Exception e) {
e.printStackTrace();
}
return b;
}
}Use tFileList to get a list of the file names. I iterated this to tFileProperties to get the file properties and mapped them to an output file.
this file is passed to a tMap to update the database.
Ignore the Word function in the map - it's just for formatting the person's name.
Last edited by janhess (2012-04-23 15:33:18)
Offline
Pages: 1