mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-25 17:34:13 +00:00
Added ReadableFile#size()
This commit is contained in:
+6
@@ -61,6 +61,12 @@ class CryptoReadableFile implements ReadableFile {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long size() throws UncheckedIOException {
|
||||
assert decryptor != null : "decryptor is always being set during position(long)";
|
||||
return decryptor.contentLength();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void position(long position) throws UncheckedIOException {
|
||||
if (readAheadTask != null) {
|
||||
|
||||
+1
@@ -109,6 +109,7 @@ class CryptoWritableFile implements WritableFile {
|
||||
encryptor.append(FileContentCryptor.EOF);
|
||||
writeTask.get();
|
||||
writeHeader();
|
||||
// TODO append padding
|
||||
} catch (ExecutionException e) {
|
||||
if (e.getCause() instanceof UncheckedIOException) {
|
||||
throw (UncheckedIOException) e.getCause();
|
||||
|
||||
Reference in New Issue
Block a user