inputStream 을 String으로 만들때
StringBuffer sb = new StringBuffer();
byte[] b = new byte[4096];
for (int n; (n = inputStream.read(b)) != -1;) {
sb.append(new String(b, 0, n));
}
sb.toString();
byte[] b = new byte[4096];
for (int n; (n = inputStream.read(b)) != -1;) {
sb.append(new String(b, 0, n));
}
sb.toString();
String 을 inputStream 으로 만들때
InputStream input = new ByteArrayInputStream(contents.getBytes("UTF-8"));