Autopsy  4.5.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream Class Reference

Inherits InputStream.

Public Member Functions

int read () throws IOException
 
int read (byte[] b, int off, int len) throws IOException
 

Private Member Functions

 InternationalStream (AbstractFile content, List< SCRIPT > scripts, boolean extractUTF8, boolean extractUTF16)
 
void convert (int numBytes)
 

Private Attributes

int bytesInConvertBuff = 0
 
final AbstractFile content
 
byte[] convertBuff
 
int convertBuffOffset = 0
 
boolean fileEOF = false
 
final byte[] fileReadBuff = new byte[FILE_BUF_SIZE]
 
long fileReadOffset = 0L
 
StringExtract.StringExtractResult lastExtractResult
 
final boolean nothingToDo
 
final byte[] oneCharBuf = new byte[1]
 
final StringExtract stringExtractor
 

Static Private Attributes

static final int FILE_BUF_SIZE = 1024 * 1024
 
static final Logger logger = Logger.getLogger(InternationalStream.class.getName())
 

Detailed Description

Wrapper over StringExtract to provide streaming API Given AbstractFile object, extract international strings from the file and read output as a stream of UTF-8 strings as encoded bytes.

Definition at line 371 of file StringsTextExtractor.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.InternationalStream ( AbstractFile  content,
List< SCRIPT scripts,
boolean  extractUTF8,
boolean  extractUTF16 
)
private

Constructs new stream object that does conversion from file, to extracted strings, then to byte stream, for specified script, auto-detected encoding (UTF8, UTF16LE, UTF16BE), and specified output byte stream encoding

Parameters
contentinput content to process and turn into a stream to convert into strings
scriptsa list of scripts to consider
extractUTF8whether to extract utf8 encoding
extractUTF16whether to extract utf16 encoding

Definition at line 403 of file StringsTextExtractor.java.

References org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.content, org.sleuthkit.autopsy.coreutils.StringExtract.setEnabledScripts(), org.sleuthkit.autopsy.coreutils.StringExtract.setEnableUTF16(), and org.sleuthkit.autopsy.coreutils.StringExtract.setEnableUTF8().

Member Function Documentation

void org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.convert ( int  numBytes)
private
int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.read ( ) throws IOException
int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.read ( byte[]  b,
int  off,
int  len 
) throws IOException

Member Data Documentation

int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.bytesInConvertBuff = 0
private

Definition at line 387 of file StringsTextExtractor.java.

final AbstractFile org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.content
private
byte [] org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.convertBuff
private

Definition at line 385 of file StringsTextExtractor.java.

int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.convertBuffOffset = 0
private
final int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.FILE_BUF_SIZE = 1024 * 1024
staticprivate

Definition at line 374 of file StringsTextExtractor.java.

boolean org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.fileEOF = false
private

Definition at line 388 of file StringsTextExtractor.java.

final byte [] org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.fileReadBuff = new byte[FILE_BUF_SIZE]
private

Definition at line 383 of file StringsTextExtractor.java.

long org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.fileReadOffset = 0L
private

Definition at line 384 of file StringsTextExtractor.java.

StringExtract.StringExtractResult org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.lastExtractResult
private
final Logger org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.logger = Logger.getLogger(InternationalStream.class.getName())
staticprivate

Definition at line 373 of file StringsTextExtractor.java.

final boolean org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.nothingToDo
private

true if there is nothing to do because neither extractUTF8 nor extractUTF16 was true in constructor

Definition at line 382 of file StringsTextExtractor.java.

final byte [] org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.oneCharBuf = new byte[1]
private

Definition at line 376 of file StringsTextExtractor.java.

final StringExtract org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.InternationalStream.stringExtractor
private

Definition at line 377 of file StringsTextExtractor.java.


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

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