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:
akwizgran
2011-07-12 20:27:37 +01:00
parent 22a67cc0d2
commit c3643a037b
9 changed files with 78 additions and 23 deletions

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -6,6 +6,7 @@ import java.util.Map;
public interface Writer {
long getRawBytesWritten();
void close() throws IOException;
void writeBoolean(boolean b) throws IOException;