19 package org.sleuthkit.datamodel.Examples;
21 import java.lang.reflect.Array;
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.UUID;
25 import java.util.logging.Level;
26 import java.util.logging.Logger;
40 public static void run(String imagePath) {
47 ArrayList<String> paths =
new ArrayList<String>();
50 process.
run(UUID.randomUUID().toString(), paths.toArray(
new String[paths.size()]));
52 Logger.getLogger(
Sample.class.getName()).log(Level.SEVERE, null, ex);
58 for (
Image image : images) {
59 System.out.println(
"Found image: " + image.getName());
60 System.out.println(
"There are " + image.getChildren().size() +
" children.");
62 System.out.println(
'"' + content.getName() +
'"' +
" is a child of " + image.getName());
67 List<AbstractFile> files = sk.
findAllFilesWhere(
"LOWER(name) LIKE LOWER('%.txt')");
69 System.out.println(
"Found text file: " + file.getName());
73 System.out.println(
"Exception caught: " + e.getMessage());
79 public static void usage(String error) {
80 System.out.println(
"Usage: ant -Dimage:{image string} run-sample");
81 if (error.contains(
"deleted first")) {
82 System.out.println(
"A database for the image already exists. Delete it to run this sample again.");
83 }
else if (error.contains(
"unable to open database")) {
84 System.out.println(
"Image must be encapsulated by double quotes. Ex: ant -Dimage=\"C:\\Users\\You\\image.E01\" run-sample");
88 public static void main(String[] args) {
AddImageProcess makeAddImageProcess(String timezone, boolean addUnallocSpace, boolean noFatFsOrphans, String imageWriterPath)
static void run(String imagePath)
void run(String deviceId, String[] imageFilePaths)
synchronized long commit()
static void main(String[] args)
static void usage(String error)
List< Image > getImages()
List< Content > getChildren()
List< AbstractFile > findAllFilesWhere(String sqlWhereClause)
static SleuthkitCase newCase(String dbPath)