mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Added accessors for the amount of raw data read and written by readers and writers - this fixes a fixme in MessageParserImpl.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package net.sf.briar.api.crypto;
|
||||
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.security.PublicKey;
|
||||
import java.security.spec.InvalidKeySpecException;
|
||||
|
||||
public interface KeyParser {
|
||||
|
||||
PublicKey parsePublicKey(byte[] encodedKey) throws GeneralSecurityException;
|
||||
PublicKey parsePublicKey(byte[] encodedKey) throws InvalidKeySpecException;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ public interface Reader {
|
||||
boolean eof() throws IOException;
|
||||
void setReadLimit(long limit);
|
||||
void resetReadLimit();
|
||||
long getRawBytesRead();
|
||||
void close() throws IOException;
|
||||
|
||||
boolean hasBoolean() throws IOException;
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Map;
|
||||
|
||||
public interface Writer {
|
||||
|
||||
long getRawBytesWritten();
|
||||
void close() throws IOException;
|
||||
|
||||
void writeBoolean(boolean b) throws IOException;
|
||||
|
||||
Reference in New Issue
Block a user