Changeset 2171


Ignore:
Timestamp:
01/29/07 10:33:49 (13 years ago)
Author:
melissa
Message:

Close files opened by isThisType.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/LeicaReader.java

    r2159 r2171  
    210210    return (String[]) v.toArray(new String[0]); 
    211211  } 
     212  
     213  /* @see IFormatReader#close(boolean) */ 
     214  /* 
     215  public void close(boolean fileOnly) throws FormatException, IOException { 
     216    if (fileOnly) { 
     217      if (in != null) in.close(); 
     218      if (tiff != null) { 
     219        for (int i=0; i<tiff.length; i++) { 
     220          if (tiff[i] != null) { 
     221            for (int j=0; j<tiff[i].length; j++) { 
     222              if (tiff[i][j] != null) tiff[i][j].close(fileOnly); 
     223            } 
     224          } 
     225        } 
     226      } 
     227    } 
     228    else close(); 
     229  } 
     230  */ 
    212231 
    213232  /** Closes any open files. */ 
     
    591610      RandomAccessStream ras = new RandomAccessStream(name); 
    592611      Hashtable ifd = TiffTools.getFirstIFD(ras); 
     612      ras.close(); 
    593613      if (ifd == null) return false; 
    594614 
Note: See TracChangeset for help on using the changeset viewer.