Autopsy  4.21.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.textextractors.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 (Content content)
void appendResetTemp ()
int copyToReturn (byte[] b, int off, long len)

Private Attributes

int bytesInReadBuf = 0
final Content 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 int MIN_PRINTABLE_CHARS = 4
static final String NLS = Character.toString((char) 10)
static final int READ_BUF_SIZE = 65536

Detailed Description

Content input string stream reader/converter - given Content, 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 146 of file

Constructor & Destructor Documentation

org.sleuthkit.autopsy.textextractors.StringsTextExtractor.EnglishOnlyStream.EnglishOnlyStream ( Content  content)

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

contentContent object from which to extract strings.

Definition at line 176 of file

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

Member Function Documentation

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

Definition at line 341 of file

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

Definition at line 331 of file

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

Definition at line 347 of file

Member Data Documentation

int org.sleuthkit.autopsy.textextractors.StringsTextExtractor.EnglishOnlyStream.bytesInReadBuf = 0
final Content org.sleuthkit.autopsy.textextractors.StringsTextExtractor.EnglishOnlyStream.content
long org.sleuthkit.autopsy.textextractors.StringsTextExtractor.EnglishOnlyStream.contentOffset = 0

Definition at line 156 of file

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

Definition at line 157 of file

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

Definition at line 160 of file

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

Definition at line 167 of file

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

Definition at line 164 of file

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

Definition at line 150 of file

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

Definition at line 148 of file

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

Definition at line 168 of file

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

Definition at line 149 of file

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

Definition at line 159 of file

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

Definition at line 166 of file

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

Definition at line 165 of file

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

Definition at line 162 of file

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

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

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