Autopsy
4.9.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Inherits Reader.
Classes | |
class | ExcessBytes |
Public Member Functions | |
SQLiteStreamReader (AbstractFile file) | |
void | close () throws IOException |
int | read (char[] cbuf, int off, int len) throws IOException |
Private Member Functions | |
void | fillBuffer (String val) |
Consumer< String > | getColumnNameStrategy () |
Consumer< Object > | getForAllTableValuesStrategy () |
Private Attributes | |
char[] | buf |
int | bufIndex |
String | currentTableName |
final AbstractFile | file |
ExcessBytes | leftOvers |
final SQLiteTableReader | reader |
Iterator< String > | tableNames |
int | totalColumns |
Produces a continuous stream of characters from a database file. To achieve this, all table names are queues up and a SQLiteTableReader is used to do the actual queries and table iteration.
Definition at line 83 of file SqliteTextExtractor.java.
org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.SQLiteStreamReader | ( | AbstractFile | file | ) |
Creates a new reader for the sqlite file. This table reader class will iterate through a table row by row and pass the values to different functions based on data type. Here we define what to do on the column names and we define what to do for all data types.
file | Sqlite file |
Definition at line 105 of file SqliteTextExtractor.java.
References org.sleuthkit.autopsy.coreutils.SQLiteTableReader.Builder.build(), org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.file, org.sleuthkit.autopsy.coreutils.SQLiteTableReader.Builder.forAllColumnNames(), org.sleuthkit.autopsy.coreutils.SQLiteTableReader.Builder.forAllTableValues(), org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.getColumnNameStrategy(), and org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.getForAllTableValuesStrategy().
void org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.close | ( | ) | throws IOException |
Definition at line 264 of file SqliteTextExtractor.java.
References org.sleuthkit.autopsy.coreutils.SQLiteTableReader.close().
|
private |
This functions writes the string representation of a database value into the read buffer. If the buffer becomes full, we save the extra characters and hold on to them until the next call to read().
val | Formatted database value string |
Definition at line 187 of file SqliteTextExtractor.java.
Referenced by org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.getColumnNameStrategy(), and org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.getForAllTableValuesStrategy().
|
private |
On every column name in the header do the following series of steps: 1) Write the tableName before the header. 2) Format the column name based on row positioning 3) Reset the count if we are at the end, that way if we want to read multiple tables we can do so without having to build new consumers.
columnIndex is purely for keeping track of where the column name is in the table, hence the bounds checking with the mod function.
Definition at line 161 of file SqliteTextExtractor.java.
References org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.fillBuffer(), and org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.totalColumns.
Referenced by org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.SQLiteStreamReader().
|
private |
On every item in the database we want to do the following series of steps: 1) Get it's string representation (ignore blobs with empty string). 2) Format it based on its positioning in the row. 3) Write it to buffer
rowIndex is purely for keeping track of where the object is in the table, hence the bounds checking with the mod function.
Definition at line 123 of file SqliteTextExtractor.java.
References org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.fillBuffer(), and org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.totalColumns.
Referenced by org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.SQLiteStreamReader().
int org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.read | ( | char[] | cbuf, |
int | off, | ||
int | len | ||
) | throws IOException |
Reads database values into the buffer. This function is responsible for getting the next table in the queue, initiating calls to the SQLiteTableReader, and filling in any excess bytes that are lingering from the previous call.
IOException |
Definition at line 207 of file SqliteTextExtractor.java.
References org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.bufIndex, org.sleuthkit.autopsy.coreutils.SQLiteTableReader.getColumnCount(), org.sleuthkit.autopsy.coreutils.SQLiteTableReader.getTableNames(), org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.ExcessBytes.isFinished(), org.sleuthkit.autopsy.coreutils.SQLiteTableReader.isFinished(), org.sleuthkit.autopsy.coreutils.SQLiteTableReader.read(), and org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.ExcessBytes.read().
|
private |
Definition at line 91 of file SqliteTextExtractor.java.
|
private |
Definition at line 95 of file SqliteTextExtractor.java.
Referenced by org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.read().
|
private |
Definition at line 89 of file SqliteTextExtractor.java.
|
private |
Definition at line 86 of file SqliteTextExtractor.java.
Referenced by org.sleuthkit.autopsy.textreaders.SqliteTextExtractor.SQLiteStreamReader.SQLiteStreamReader().
|
private |
Definition at line 92 of file SqliteTextExtractor.java.
|
private |
Definition at line 85 of file SqliteTextExtractor.java.
|
private |
Definition at line 88 of file SqliteTextExtractor.java.
|
private |
Copyright © 2012-2018 Basis Technology. Generated on: Tue Dec 18 2018
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.