You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Steshin (Jira)" <ji...@apache.org> on 2021/08/20 12:04:00 UTC
[jira] [Created] (IGNITE-15350) Refactor EncryptedFileIO
Vladimir Steshin created IGNITE-15350:
-----------------------------------------
Summary: Refactor EncryptedFileIO
Key: IGNITE-15350
URL: https://issues.apache.org/jira/browse/IGNITE-15350
Project: Ignite
Issue Type: Task
Reporter: Vladimir Steshin
Current EncryptedFileIO has wierd implementations of several methods. Like
{code:java}
@Override public int write(byte[] buf, int off, int len) throws IOException {
throw new UnsupportedOperationException("Encrypted File doesn't support this operation");
}
{code}
@Override public int read(byte[] buf, int off, int len) throws IOException {
throw new UnsupportedOperationException("Encrypted File doesn't support this operation");
}
Why not supported?
Or:
{code:java}
@Override public int read(ByteBuffer destBuf) throws IOException {
assert position() == 0;
return plainFileIO.read(destBuf);
}
{code}
Why encrypted reading is not supported beyond the header? Why `assert position() == 0`
The class contains several writes and reading implemented differently. Some of them are not supported.
Suggestion: Make one write(...) and one read(...) implementation and call them passing correct arguments. Read/write the header without encryption. Read/write everything beyond the header with encryption.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)