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.EnglishOnlyStream Class Reference

Inherits InputStream.

Public Member Functions

int available () throws IOException
int read (byte[] b, int off, int len) throws IOException
int read () throws IOException
long skip (long n) throws IOException

Private Member Functions

 EnglishOnlyStream (AbstractFile content)
void appendResetTemp ()
int copyToReturn (byte[] b, int off, long len)

Private Attributes

int bytesInReadBuf = 0
final AbstractFile content
long contentOffset = 0
final byte[] curReadBuf = new byte[READ_BUF_SIZE]
StringBuilder curString = new StringBuilder()
int curStringLen = 0
boolean inString = false
boolean isEOF = false
final byte[] oneCharBuf = new byte[1]
int readBufOffset = 0
boolean stringAtBufBoundary = false
boolean stringAtTempBoundary = false
StringBuilder tempString = new StringBuilder()
int tempStringLen = 0

Static Private Attributes

static final Logger logger = Logger.getLogger(EnglishOnlyStream.class.getName())
static final int MIN_PRINTABLE_CHARS = 4
static final String NLS = Character.toString((char) 10)
static final int READ_BUF_SIZE = 65536

Detailed Description

AbstractFile input string stream reader/converter - given AbstractFile, extract strings from it and return encoded bytes via read()

Note: the utility supports extraction of only LATIN script and UTF8, UTF16LE, UTF16BE encodings and uses a brute force encoding detection - it's fast but could apply multiple encodings on the same string.

For other script/languages support and better encoding detection use AbstractFileStringIntStream streaming class, which wraps around StringExtract extractor.

Definition at line 151 of file

Constructor & Destructor Documentation

org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.EnglishOnlyStream ( AbstractFile  content)

Construct new string stream from FsContent. Do not attempt to fill entire read buffer if that would break a string

contentContent object from which to extract strings.

Definition at line 182 of file

References org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.content.

Member Function Documentation

void org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.appendResetTemp ( )
int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.available ( ) throws IOException

Definition at line 352 of file

int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.copyToReturn ( byte[]  b,
int  off,
long  len 
int ( byte[]  b,
int  off,
int  len 
) throws IOException
int ( ) throws IOException

Definition at line 342 of file

long org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.skip ( long  n) throws IOException

Definition at line 358 of file

Member Data Documentation

int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.bytesInReadBuf = 0
final AbstractFile org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.content
long org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.contentOffset = 0

Definition at line 162 of file

final byte [] org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.curReadBuf = new byte[READ_BUF_SIZE]

Definition at line 163 of file

StringBuilder org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.curString = new StringBuilder()

Definition at line 166 of file

int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.curStringLen = 0
boolean org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.inString = false

Definition at line 173 of file

boolean org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.isEOF = false

Definition at line 170 of file

final Logger org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.logger = Logger.getLogger(EnglishOnlyStream.class.getName())

Definition at line 153 of file

final int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.MIN_PRINTABLE_CHARS = 4

Definition at line 156 of file

final String org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.NLS = Character.toString((char) 10)

Definition at line 154 of file

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

Definition at line 174 of file

final int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.READ_BUF_SIZE = 65536

Definition at line 155 of file

int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.readBufOffset = 0

Definition at line 165 of file

boolean org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.stringAtBufBoundary = false

Definition at line 172 of file

boolean org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.stringAtTempBoundary = false

Definition at line 171 of file

StringBuilder org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.tempString = new StringBuilder()

Definition at line 168 of file

int org.sleuthkit.autopsy.keywordsearch.StringsTextExtractor.EnglishOnlyStream.tempStringLen = 0

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

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