+ tempException = new CTFReaderException(e);
+ } catch (ParseException e) {
+ tempException = new CTFReaderException(e);
+ } catch (MismatchedTokenException e) {
+ tempException = new CTFReaderException(e);
+ } catch (RecognitionException e) {
+ tempException = new CTFReaderException(e);
+ }
+
+ /* Ghetto resource management. Java 7 will deliver us from this... */
+ if (metadataTextInput != null) {
+ try {
+ metadataTextInput.close();
+ } catch (IOException e) {
+ // Do nothing
+ }
+ }
+ if (metadataFileChannel != null) {
+ try {
+ metadataFileChannel.close();
+ } catch (IOException e) {
+ // Do nothing
+ }
+ }
+ if (fis != null) {
+ try {
+ fis.close();
+ } catch (IOException e) {
+ // Do nothing
+ }
+ }
+
+ if (tempException != null) {
+ throw tempException;