try {
SleuthkitCase sk = SleuthkitCase.newCase(imagePath + ".db");
// initialize the case with an image
String timezone = "";
AddImageProcess process = sk.makeAddImageProcess(timezone, true, false);
ArrayList<String> paths = new ArrayList<String>();
paths.add(imagePath);
try {
process.run(paths.toArray(new String[paths.size()]));
} catch (TskDataException ex) {
Logger.getLogger(Sample.class.getName()).log(Level.SEVERE, null, ex);
}
process.commit();
// print out all the images found, and their children
List<Image> images = sk.getImages();
for (Image image : images) {
System.out.println("Found image: " + image.getName());