Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
overheadhunter committed Jan 25, 2022
1 parent 00d866f commit 96f00c9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
*******************************************************************************/
package org.cryptomator.cryptolib.api;

import org.cryptomator.cryptolib.api.AuthenticationFailedException;
import org.cryptomator.cryptolib.api.Cryptor;
import org.cryptomator.cryptolib.api.CryptorProvider;
import org.cryptomator.cryptolib.api.Masterkey;
import org.cryptomator.cryptolib.common.DecryptingReadableByteChannel;
import org.cryptomator.cryptolib.common.EncryptingWritableByteChannel;
import org.cryptomator.cryptolib.common.SecureRandomMock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public boolean isOpen() {
}

@Override
public void close() throws IOException {
public void close() {
open = false;
}

Expand All @@ -46,7 +46,7 @@ public int read(ByteBuffer dst) throws IOException {
}

@Override
public int write(ByteBuffer src) throws IOException {
public int write(ByteBuffer src) {
int num = Math.min(buf.remaining(), src.remaining());
ByteBuffer limitedSrc = src.asReadOnlyBuffer();
limitedSrc.limit(limitedSrc.position() + num);
Expand All @@ -55,12 +55,12 @@ public int write(ByteBuffer src) throws IOException {
}

@Override
public long position() throws IOException {
public long position() {
return buf.position();
}

@Override
public SeekableByteChannel position(long newPosition) throws IOException {
public SeekableByteChannel position(long newPosition) {
assert newPosition < Integer.MAX_VALUE;
buf.position((int) newPosition);
return this;
Expand All @@ -72,7 +72,7 @@ public long size() throws IOException {
}

@Override
public SeekableByteChannel truncate(long size) throws IOException {
public SeekableByteChannel truncate(long size) {
assert size < Integer.MAX_VALUE;
if (size < buf.position()) {
buf.position((int) size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.SeekableByteChannel;
import java.nio.channels.WritableByteChannel;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Arrays;

Expand Down

0 comments on commit 96f00c9

Please sign in to comment.