separated filename shortening layer from metadata hiding layer

This commit is contained in:
Sebastian Stenzel
2015-12-29 16:24:42 +01:00
parent aa89f60c2f
commit 9385c3bf6d
20 changed files with 370 additions and 317 deletions
@@ -58,7 +58,11 @@ class InMemoryFile extends InMemoryNode implements File, ReadableFile, WritableF
@Override
public int read(ByteBuffer target) {
return ByteBuffers.copy(content, target);
if (content.hasRemaining()) {
return ByteBuffers.copy(content, target);
} else {
return -1;
}
}
@Override
@@ -114,7 +118,7 @@ class InMemoryFile extends InMemoryNode implements File, ReadableFile, WritableF
// returning null removes the entry.
return null;
});
assert !this.exists();
assert!this.exists();
}
@Override