Changeset 2030


Ignore:
Timestamp:
01/05/07 12:27:20 (13 years ago)
Author:
melissa
Message:
  • Added feature to read files over HTTP.
  • Updated "what's new" list
Location:
trunk/loci/formats
Files:
1 added
2 edited

Legend:

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

    r2010 r2030  
    8989   */ 
    9090  public RandomAccessStream(String file) throws IOException { 
    91     raf = new RAFile(file, "r"); 
    92     dis = new DataInputStream(new BufferedInputStream( 
    93       new FileInputStream(file), MAX_OVERHEAD)); 
     91    File f = new File(file); 
     92    if (f.exists()) { 
     93      raf = new RAFile(file, "r"); 
     94      dis = new DataInputStream(new BufferedInputStream( 
     95        new FileInputStream(file), MAX_OVERHEAD)); 
     96      int len = (int) raf.length(); 
     97      buf = new byte[len < MAX_OVERHEAD ? len : MAX_OVERHEAD]; 
     98      raf.readFully(buf); 
     99      raf.seek(0); 
     100      recent = new Vector(); 
     101      recent.add(new Integer(MAX_OVERHEAD / 2)); 
     102      nextMark = MAX_OVERHEAD; 
     103    } 
     104    else { 
     105      raf = new RAUrl(file, "r"); 
     106    } 
    94107    this.file = file; 
    95108    fp = 0; 
    96109    afp = 0; 
    97     int len = (int) raf.length(); 
    98     buf = new byte[len < MAX_OVERHEAD ? len : MAX_OVERHEAD]; 
    99     raf.readFully(buf); 
    100     raf.seek(0); 
    101     recent = new Vector(); 
    102     recent.add(new Integer(MAX_OVERHEAD / 2)); 
    103     nextMark = MAX_OVERHEAD; 
    104110  } 
    105111 
  • trunk/loci/formats/whats-new.txt

    r1972 r2030  
     1* Added support for Prairie TIFF 
     2* Fixed bugs in Zeiss LSM, OIB, OIF, and ND2 
     3* Improved API for writing files 
     4* Added feature to read files over HTTP 
     5* Fixed bugs in automated testing framework 
     6* Miscellaneous bugfixes 
     7 
    182006 Dec 22: 
    29* Expanded ImageJ plugin to optionally use Image5D or View5D 
Note: See TracChangeset for help on using the changeset viewer.