Changeset 4090


Ignore:
Timestamp:
06/02/08 15:34:44 (12 years ago)
Author:
curtis
Message:

Close only the active reader or writer, rather than all readers and writers.

Location:
trunk/loci/formats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ImageReader.java

    r4048 r4090  
    429429  /* @see IFormatReader#close(boolean) */ 
    430430  public void close(boolean fileOnly) throws IOException { 
    431     for (int i=0; i<readers.length; i++) readers[i].close(fileOnly); 
     431    if (currentId == null) return; // nothing to close 
     432    getReader().close(fileOnly); 
    432433    if (!fileOnly) currentId = null; 
    433434  } 
  • trunk/loci/formats/ImageWriter.java

    r4048 r4090  
    310310  /* @see IFormatHandler#close() */ 
    311311  public void close() throws IOException { 
    312     for (int i=0; i<writers.length; i++) writers[i].close(); 
     312    getWriter().close(); 
    313313  } 
    314314 
Note: See TracChangeset for help on using the changeset viewer.