Changeset 7033 in josm for trunk/src/org/openstreetmap/josm/io/CacheFiles.java
- Timestamp:
- 2014-05-01T02:34:43+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/CacheFiles.java
r7005 r7033 114 114 115 115 byte[] bytes = new byte[(int) data.length()]; 116 new RandomAccessFile(data, "r").readFully(bytes); 116 try (RandomAccessFile raf = new RandomAccessFile(data, "r")) { 117 raf.readFully(bytes); 118 } 117 119 return bytes; 118 120 } catch (Exception e) { … … 135 137 } 136 138 // rws also updates the file meta-data, i.e. last mod time 137 RandomAccessFile raf = new RandomAccessFile(f, "rws"); 138 try { 139 try (RandomAccessFile raf = new RandomAccessFile(f, "rws")) { 139 140 raf.write(data); 140 } finally {141 Utils.close(raf);142 141 } 143 142 } catch (Exception e) {
Note:
See TracChangeset
for help on using the changeset viewer.
