현재 버전

tou 안드로이드 쪽에서 처리하는 부분 말씀이신거죠? 이렇게 받았습니다..

Log.i(TAG, "[" + url.toString() + "]" + "responseCode : " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
InputStream is = request.getInputStream();

ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] byteBuffer = new byte[65524];
byte[] byteData = null;
int nLength = 0;
while ((nLength = is.read(byteBuffer)) != -1) {
baos.write(byteBuffer, 0, nLength);
}


byteData = baos.toByteArray();
response = new String(byteData);

request.disconnect();
}
int responseCode = request.getResponseCode();
Log.i(TAG, "[" + url.toString() + "]" + " responseCode : " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {

BufferedReader bi2 = new BufferedReader( new InputStreamReader( request.getInputStream(),"utf-8" ) );


String s = "";
StringBuilder xml = new StringBuilder();
while ( ( s = bi2.readLine() ) !=null) {
xml.append(s);
}
response = xml.toString();

bi2.close();

request.disconnect();
}

수정 이력

2019-06-26 15:25:36 에 아래 내용에서 변경 됨 #2

tou 안드로이드 쪽에서 처리하는 부분 말씀이신거죠? 이렇게 받았습니다..

Log.i(TAG, "[" + url.toString() + "]" + "responseCode : " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
InputStream is = request.getInputStream();

ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] byteBuffer = new byte[65524];
byte[] byteData = null;
int nLength = 0;
while ((nLength = is.read(byteBuffer)) != -1) {
baos.write(byteBuffer, 0, nLength);
}


byteData = baos.toByteArray();
response = new String(byteData);

request.disconnect();
}
2019-06-26 15:24:00 에 아래 내용에서 변경 됨 #1

안드로이드 쪽에서 처리하는 부분 말씀이신거죠?

Log.i(TAG, "[" + url.toString() + "]" + "responseCode : " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
InputStream is = request.getInputStream();

ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] byteBuffer = new byte[65524];
byte[] byteData = null;
int nLength = 0;
while ((nLength = is.read(byteBuffer)) != -1) {
baos.write(byteBuffer, 0, nLength);
}


byteData = baos.toByteArray();
response = new String(byteData);

request.disconnect();
}