Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.datamodel.ContentUtils Class Reference

Classes

class  ExtractFscContentVisitor
 
class  SystemNameVisitor
 

Static Public Member Functions

static String getStringTime (long epochSeconds, TimeZone tzone)
 
static String getStringTime (long epochSeconds, Content c)
 
static String getStringTimeISO8601 (long epochSeconds, TimeZone tzone)
 
static String getStringTimeISO8601 (long epochSeconds, Content c)
 
static String getSystemName (Content content)
 
static TimeZone getTimeZone (Content c)
 
static boolean isDotDirectory (AbstractFile dir)
 
static boolean shouldDisplayTimesInLocalTime ()
 
static< T > long writeToFile (Content content, java.io.File outputFile, ProgressHandle progress, Future< T > worker, boolean source) throws IOException
 
static void writeToFile (Content content, java.io.File outputFile) throws IOException
 
static long writeToFile (Content content, java.io.File outputFile, Supplier< Boolean > cancelCheck) throws IOException
 

Private Member Functions

 ContentUtils ()
 

Static Private Attributes

static final SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z")
 
static final SimpleDateFormat dateFormatterISO8601 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'")
 
static boolean displayTimesInLocalTime = UserPreferences.displayTimesInLocalTime()
 
static final Logger logger = Logger.getLogger(ContentUtils.class.getName())
 
static final SystemNameVisitor systemName = new SystemNameVisitor()
 
static final int TO_FILE_BUFFER_SIZE = 8192
 

Detailed Description

Static class of utility methods for Content objects

Definition at line 53 of file ContentUtils.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.datamodel.ContentUtils.ContentUtils ( )
private

Definition at line 72 of file ContentUtils.java.

Member Function Documentation

static String org.sleuthkit.autopsy.datamodel.ContentUtils.getStringTime ( long  epochSeconds,
TimeZone  tzone 
)
static
static String org.sleuthkit.autopsy.datamodel.ContentUtils.getStringTime ( long  epochSeconds,
Content  c 
)
static

Convert epoch seconds to a string value (convenience method)

Parameters
epochSeconds
c
Returns

Definition at line 115 of file ContentUtils.java.

References org.sleuthkit.autopsy.datamodel.ContentUtils.getStringTime(), and org.sleuthkit.autopsy.datamodel.ContentUtils.getTimeZone().

static String org.sleuthkit.autopsy.datamodel.ContentUtils.getStringTimeISO8601 ( long  epochSeconds,
TimeZone  tzone 
)
static
static String org.sleuthkit.autopsy.datamodel.ContentUtils.getStringTimeISO8601 ( long  epochSeconds,
Content  c 
)
static

Convert epoch seconds to a string value (convenience method) in ISO8601 format such as 2008-07-04T13:45:04Z

Parameters
epochSeconds
c
Returns

Definition at line 128 of file ContentUtils.java.

References org.sleuthkit.autopsy.datamodel.ContentUtils.getStringTimeISO8601(), and org.sleuthkit.autopsy.datamodel.ContentUtils.getTimeZone().

static String org.sleuthkit.autopsy.datamodel.ContentUtils.getSystemName ( Content  content)
static

Definition at line 153 of file ContentUtils.java.

References org::sleuthkit::datamodel::Content.accept().

static TimeZone org.sleuthkit.autopsy.datamodel.ContentUtils.getTimeZone ( Content  c)
static
static boolean org.sleuthkit.autopsy.datamodel.ContentUtils.isDotDirectory ( AbstractFile  dir)
static
static boolean org.sleuthkit.autopsy.datamodel.ContentUtils.shouldDisplayTimesInLocalTime ( )
static

Indicates whether or not times should be displayed using local time.

Returns
True or false.

Definition at line 437 of file ContentUtils.java.

References org.sleuthkit.autopsy.datamodel.ContentUtils.displayTimesInLocalTime.

Referenced by org.sleuthkit.autopsy.datamodel.ContentUtils.getTimeZone().

static <T> long org.sleuthkit.autopsy.datamodel.ContentUtils.writeToFile ( Content  content,
java.io.File  outputFile,
ProgressHandle  progress,
Future< T >  worker,
boolean  source 
) throws IOException
static

Reads all the data from any content object and writes (extracts) it to a file.

Parameters
contentAny content object.
outputFileWill be created if it doesn't exist, and overwritten if it does
progressprogress bar handle to update, if available. null otherwise
workerthe swing worker background thread the process runs within, or null, if in the main thread, used to handle task cancellation
sourcetrue if source file
Returns
number of bytes extracted
Exceptions
IOExceptionif file could not be written

Definition at line 187 of file ContentUtils.java.

References org.sleuthkit.autopsy.datamodel.ContentUtils.TO_FILE_BUFFER_SIZE.

Referenced by org.sleuthkit.autopsy.directorytree.ExternalViewerAction.actionPerformed(), org.sleuthkit.autopsy.corecomponents.FXVideoPanel.MediaPane.ExtractMedia.call(), org.sleuthkit.autopsy.corecomponents.GstVideoPanel.ExtractMedia.doInBackground(), org.sleuthkit.autopsy.thunderbirdparser.ThunderbirdMboxFileIngestModule.processMBox(), org.sleuthkit.autopsy.thunderbirdparser.ThunderbirdMboxFileIngestModule.processPst(), org.sleuthkit.autopsy.datamodel.ContentUtils.ExtractFscContentVisitor< T, V >.visit(), and org.sleuthkit.autopsy.datamodel.ContentUtils.writeToFile().

static void org.sleuthkit.autopsy.datamodel.ContentUtils.writeToFile ( Content  content,
java.io.File  outputFile 
) throws IOException
static
static long org.sleuthkit.autopsy.datamodel.ContentUtils.writeToFile ( Content  content,
java.io.File  outputFile,
Supplier< Boolean >  cancelCheck 
) throws IOException
static

Reads all the data from any content object and writes (extracts) it to a file, using a cancellation check instead of a Future object method.

Parameters
contentAny content object.
outputFileWill be created if it doesn't exist, and overwritten if it does
cancelCheckA function used to check if the file write process should be terminated.
Returns
number of bytes extracted
Exceptions
IOExceptionif file could not be written

Definition at line 238 of file ContentUtils.java.

References org.sleuthkit.autopsy.datamodel.ContentUtils.TO_FILE_BUFFER_SIZE.

Member Data Documentation

final SimpleDateFormat org.sleuthkit.autopsy.datamodel.ContentUtils.dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z")
staticprivate
final SimpleDateFormat org.sleuthkit.autopsy.datamodel.ContentUtils.dateFormatterISO8601 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'")
staticprivate
boolean org.sleuthkit.autopsy.datamodel.ContentUtils.displayTimesInLocalTime = UserPreferences.displayTimesInLocalTime()
staticprivate
final Logger org.sleuthkit.autopsy.datamodel.ContentUtils.logger = Logger.getLogger(ContentUtils.class.getName())
staticprivate

Definition at line 55 of file ContentUtils.java.

final SystemNameVisitor org.sleuthkit.autopsy.datamodel.ContentUtils.systemName = new SystemNameVisitor()
staticprivate

Definition at line 151 of file ContentUtils.java.

final int org.sleuthkit.autopsy.datamodel.ContentUtils.TO_FILE_BUFFER_SIZE = 8192
staticprivate

The documentation for this class was generated from the following file:

Copyright © 2012-2016 Basis Technology. Generated on: Mon Apr 24 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.