출처: http://childeye.tistory.com/171
inputStream
-> String
StringBuffer out = new StringBuffer();
byte[] b = new byte[4096];
for (int n; (n = inputStream.read(b)) != -1;) {
out.append(new String(b, 0, n));
}
out.toString();
-------------------------------------------------
String
-> inputStream
InputStream bai = new
ByteArrayInputStream(out.toString().getBytes("UTF-8"));
댓글 없음:
댓글 쓰기