Catch ClassCastException when the encountered type doesn't match the

expected type, and re-throw as FormatException.
This commit is contained in:
akwizgran
2011-07-20 15:07:17 +01:00
parent 30d7a0f916
commit 45b4bef348
4 changed files with 47 additions and 10 deletions

View File

@@ -66,6 +66,6 @@ public interface Reader {
boolean hasUserDefinedTag() throws IOException;
int readUserDefinedTag() throws IOException;
void readUserDefinedTag(int tag) throws IOException;
<T> T readUserDefinedObject(int tag) throws IOException,
<T> T readUserDefinedObject(int tag, Class<T> t) throws IOException,
GeneralSecurityException;
}