8/22 - I/O, 스트림, IOEx 예제문제
IOEx1import java.io.*; import java.util.Arrays; class IOEx1 { public static void main(String[] args) { byte[] inSrc = {0,1,2,3,4,5,6,7,8,9}; byte[] outSrc = null; ByteArrayInputStream input = null; ByteArrayOutputStream output = null; input = new ByteArrayInputStream(inSrc); output = new ByteArrayOutputStream(); int data = 0; while((data = input.read())!=-1) { output.write(data);// void write(in..
IT & programming/Java
2012. 8. 22. 14:27