| Chunk |
|---|
| Conflicting content |
|---|
// read the content of HTTP(s) response
InputStream is = connection.getInputStream();
log("Input Stream obtained");
<<<<<<< HEAD
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int count;
while ((count = is.read(buffer)) != -1) {
out.write(buffer, 0, count);
=======
byte[] buff = new byte[2048];
int num = 0;
int byt = 0;
while ((num < buff.length) && ((byt = is.read()) != -1)) {
buff[num++] = (byte) byt;
>>>>>>> 4b60175b45767ccf679d7ac2eb61ca2788306289
}
String message = new String(out.toByteArray());
log("Got content:\n" + message); |
| Solution content |
|---|
// read the content of HTTP(s) response
InputStream is = connection.getInputStream();
log("Input Stream obtained");
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int count;
while ((count = is.read(buffer)) != -1) {
out.write(buffer, 0, count);
}
String message = new String(out.toByteArray());
log("Got content:\n" + message); |
| File |
|---|
| HttpsURLConnectionTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| Cast expression |
| Method invocation |
| Variable |
| While statement |