Public methods

Opens a FileOutputStream for writing that automatically encrypts the data based on the
provided settings.

Inherited methods

From class
java.lang.Object

Object

clone()

boolean

equals(Object arg0)

void

finalize()

final
Class<?>

getClass()

int

hashCode()

final
void

notify()

final
void

notifyAll()

String

toString()

final
void

wait(long arg0, int arg1)

final
void

wait(long arg0)

final
void

wait()

Public methods

openFileInput

public FileInputStream openFileInput ()

Opens a FileInputStream that reads encrypted files based on the previous settings.
Please ensure that the same master key and keyset are used to decrypt or it
will cause failures.

Returns

FileInputStream

The input stream to read previously encrypted data.

Throws

GeneralSecurityException

when a bad master key or keyset has been used

IOException

when the file was not found

openFileOutput

public FileOutputStream openFileOutput ()

Opens a FileOutputStream for writing that automatically encrypts the data based on the
provided settings.
Please ensure that the same master key and keyset are used to decrypt or it
will cause failures.

Returns

FileOutputStream

The FileOutputStream that encrypts all data.

Throws

GeneralSecurityException

when a bad master key or keyset has been used

IOException

when the file already exists or is not available for writing

Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.