Sleuth Kit Java Bindings (JNI)  4.11.1
Java bindings for using The Sleuth Kit
org.sleuthkit.datamodel.EncodedFileOutputStream Class Reference

Inherits BufferedOutputStream.

Public Member Functions

 EncodedFileOutputStream (OutputStream out, TskData.EncodingType type) throws IOException
 
 EncodedFileOutputStream (OutputStream out, int size, TskData.EncodingType type) throws IOException
 
long getBytesWritten ()
 
void write (int b) throws IOException
 
void write (byte[] b, int off, int len) throws IOException
 

Detailed Description

Output stream wrapper for encoding files being written to disk. The idea is to prevent malicious files from getting extracted onto the user's hard drive in their original form. The encoding type used here should match the one used to create the derived file database entry for this file.

Definition at line 31 of file EncodedFileOutputStream.java.

Constructor & Destructor Documentation

org.sleuthkit.datamodel.EncodedFileOutputStream.EncodedFileOutputStream ( OutputStream  out,
TskData.EncodingType  type 
) throws IOException

Create an encoded output stream using the specified encoding.

Parameters
out
type
Exceptions
IOException

Definition at line 44 of file EncodedFileOutputStream.java.

org.sleuthkit.datamodel.EncodedFileOutputStream.EncodedFileOutputStream ( OutputStream  out,
int  size,
TskData.EncodingType  type 
) throws IOException

Create an encoded output stream using the specified encoding and buffer size.

Parameters
out
size
type
Exceptions
IOException

Definition at line 61 of file EncodedFileOutputStream.java.

Member Function Documentation

long org.sleuthkit.datamodel.EncodedFileOutputStream.getBytesWritten ( )

Get the number of bytes written to the file, excluding header bytes. This is needed for storing the original length of the file in the tsk_files table in cases where we don't know the size in advance.

Returns
the number of bytes written to the stream, excluding the header.

Definition at line 100 of file EncodedFileOutputStream.java.

void org.sleuthkit.datamodel.EncodedFileOutputStream.write ( int  b) throws IOException

Definition at line 74 of file EncodedFileOutputStream.java.

void org.sleuthkit.datamodel.EncodedFileOutputStream.write ( byte[]  b,
int  off,
int  len 
) throws IOException

Definition at line 80 of file EncodedFileOutputStream.java.


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

Copyright © 2011-2021 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.