Changeset 11330 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-11-27T17:06:21+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r11320 r11330 1366 1366 * 1367 1367 * @param stream input stream 1368 * @return byte array of data in input stream or null if stream is null1368 * @return byte array of data in input stream (empty if stream is null) 1369 1369 * @throws IOException if any I/O error occurs 1370 1370 */ 1371 1371 public static byte[] readBytesFromStream(InputStream stream) throws IOException { 1372 1372 if (stream == null) { 1373 return n ull;1373 return new byte[0]; 1374 1374 } 1375 1375 try { … … 1386 1386 } while (!finished); 1387 1387 if (bout.size() == 0) 1388 return n ull;1388 return new byte[0]; 1389 1389 return bout.toByteArray(); 1390 1390 } finally { 1391 if (stream != null) { 1392 stream.close(); 1393 } 1391 stream.close(); 1394 1392 } 1395 1393 }
Note:
See TracChangeset
for help on using the changeset viewer.