java/src/org/openantivirus/ole OLEReader.java,1.3,1.4 OLEFile.java,1.1,1.2

Kurt Huwig <[email protected]> Sat, 03 Sep 2005 16:16:43 +0000
Newsgroups gmane.comp.security.virus.openantivirus.cvs
Message-ID <[email protected]>
Update of /cvsroot/openantivirus/java/src/org/openantivirus/ole
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28211/src/org/openantivirus/ole

Modified Files:
	OLEReader.java OLEFile.java 
Log Message:
Code cleanup

Index: OLEReader.java
===================================================================
RCS file: /cvsroot/openantivirus/java/src/org/openantivirus/ole/OLEReader.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OLEReader.java	1 May 2004 14:36:09 -0000	1.3
+++ OLEReader.java	3 Sep 2005 16:16:40 -0000	1.4
@@ -16,12 +16,8 @@
   public OLEReader( String sFileName ) throws IOException {
     OLEFile oleFile = new OLEFile( new File( sFileName ) );
     
-    try {
-      oleFile.getFileInformationBlock();
-    } catch( IOException ioe ) {
-      oleFile.close();
-      throw ioe;
-    }
+    oleFile.getFileInformationBlock();
+    oleFile.close();
     
     OLEPageMap oleBBPM = oleFile.getBigBlockPageMap();
     OLEPageMap oleSBPM = oleFile.getSmallBlockPageMap();

Index: OLEFile.java
===================================================================
RCS file: /cvsroot/openantivirus/java/src/org/openantivirus/ole/OLEFile.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- OLEFile.java	15 Sep 2001 06:44:34 -0000	1.1
+++ OLEFile.java	3 Sep 2005 16:16:40 -0000	1.2
@@ -9,7 +9,7 @@
  * @version $Id$
  */
 public class OLEFile {
-  private File file;
+  private final File file;
   private long maxPage;
   private OLEFileInformationBlock oleFIB;
   private RandomAccessFile raf;
@@ -51,7 +51,7 @@
     raf.close();
   }
 
-  public OLEFileInformationBlock getFileInformationBlock() throws IOException {
+  public OLEFileInformationBlock getFileInformationBlock() {
     return oleFIB;
   }
     
@@ -83,4 +83,12 @@
   public List getDirectoryEntryList() {
     return oleDir.getDirectoryEntryList();
   }
+
+public File getFile() {
+    return file;
+}
+
+public long getMaxPage() {
+    return maxPage;
+}
 }



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf