Created
April 26, 2016 21:43
-
-
Save jabocg/1c28ef69db64a82bd6715d3e4276f4d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a volume | |
final SecureVolume.VolumeType vt = SecureVolume.VolumeType.PERMANENT; | |
final String vFile = "/some/path/to/file"; | |
final String volLabel = "some_label"; | |
// must be multiple of 1024, at least 10MB | |
final long volSize = 1024 * 1024 * 10; | |
final SecureVolume vol; | |
try { | |
vol = saife.createVolume(vt, vFile, volLabel, volSize); | |
} catch (final ProfisioningRequredException pre) { | |
final String m = pre.getMessage(); | |
System.out.println(m); | |
} catch (final UnlockRequiredException ure) { | |
final String m = ure.getMessage(); | |
System.out.println(m); | |
} catch (final IllegalArgumentException iae) { | |
final String m = iae.getMessage(); | |
System.out.println(m); | |
} catch (final IOException ioe) { | |
final String m = ioe.getMessage(); | |
System.out.println(m); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment