Autopsy  4.10.0
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 content)
 
static String getStringTimeISO8601 (long epochSeconds, TimeZone tzone)
 
static String getStringTimeISO8601 (long epochSeconds, Content c)
 
static String getSystemName (Content content)
 
static TimeZone getTimeZone (Content content)
 
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 55 of file ContentUtils.java.

Constructor & Destructor Documentation

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

Don't instantiate

Definition at line 76 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  content 
)
static

Convert epoch seconds to a string value (convenience method)

Parameters
epochSeconds
content
Returns

Definition at line 127 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 140 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

Get system name from content using SystemNameVisitor.

Parameters
contentThe content object.
Returns
The system name.

Definition at line 172 of file ContentUtils.java.

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

Helper to ignore the '.' and '..' directories

Parameters
dirthe directory to check
Returns
true if dir is a '.' or '..' directory, false otherwise

Definition at line 300 of file ContentUtils.java.

Referenced by org.sleuthkit.autopsy.directorytree.ExtractAction.runExtractionTasks(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbSearchAction.InitializeContentVisitor.visit(), and org.sleuthkit.autopsy.datamodel.ContentUtils.ExtractFscContentVisitor< T, V >.visitDir().

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 501 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
static void org.sleuthkit.autopsy.datamodel.ContentUtils.writeToFile ( Content  content,
java.io.File  outputFile 
) throws IOException
static

Write content to an output file.

Parameters
contentThe Content object.
outputFileThe output file.
Exceptions
IOExceptionIf the file could not be written.

Definition at line 253 of file ContentUtils.java.

References org.sleuthkit.autopsy.datamodel.ContentUtils.writeToFile().

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 271 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 57 of file ContentUtils.java.

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

Definition at line 163 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-2018 Basis Technology. Generated on: Fri Mar 22 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.