Ignore:
Timestamp:
2018-12-09T20:06:53+01:00 (7 years ago)
Author:
Don-vip
Message:

see #16073 - check response contents
see #16854 - stability of created primitive IDs (accidental commit...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r14480 r14535  
    55
    66import java.io.BufferedReader;
    7 import java.io.ByteArrayOutputStream;
    87import java.io.Closeable;
    98import java.io.File;
     
    245244     */
    246245    public byte[] getByteContent() throws IOException {
    247         try (InputStream is = getInputStream()) {
    248             ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    249             int nRead;
    250             byte[] data = new byte[8192];
    251             while ((nRead = is.read(data, 0, data.length)) != -1) {
    252                 buffer.write(data, 0, nRead);
    253             }
    254             buffer.flush();
    255             return buffer.toByteArray();
    256         }
     246        return Utils.readBytesFromStream(getInputStream());
    257247    }
    258248
Note: See TracChangeset for help on using the changeset viewer.