Small improvements to code quality and readability

Add annotations to methods and parameters.
Replace Jetbrains' @NotNull with Androidx' @NonNull annotatiation.
Make class variables static if possible.
Use constants for some Strings.
Simplify if conditions.
This commit is contained in:
TobiGr 2021-12-21 20:54:06 +01:00
parent d71af9a625
commit 37b8a9375f
8 changed files with 44 additions and 39 deletions

View file

@ -108,10 +108,12 @@ public class FileStreamSAF extends SharpStream {
return true;
}
@Override
public boolean canSetLength() {
return true;
}
@Override
public boolean canSeek() {
return true;
}
@ -131,10 +133,12 @@ public class FileStreamSAF extends SharpStream {
out.write(buffer, offset, count);
}
@Override
public void setLength(long length) throws IOException {
channel.truncate(length);
}
@Override
public void seek(long offset) throws IOException {
channel.position(offset);
}