FileLogger

public final class FileLogger extends Object

Wrapper to save data to file.

Constructors

FileLogger

public FileLogger(String directory, String fileName)

Public constructor. Make sure to have write permission to target directory.

Parameters

Name Description
String directory
String fileName

FileLogger

public FileLogger(String directory, String fileName, boolean appendMode)

e Public constructor. Make sure to have write permission to target directory.

Parameters

Name Description
String directory
String fileName
boolean appendMode

Methods

log

public void log(byte[] data)

Appends data to end of the target file.

Parameters

Name Description
byte[] data

ReturnValue

Name Description
void

done

public void done()

Flushes the buffer and releases the resources.

ReturnValue

Name Description
void

getFile

public File getFile()

Returns destination file.

ReturnValue

Name Description
File