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