import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
public class M {
public static void main(String[] args) {
byte[] bytes = new byte[]{1, 2, 3};
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes);
BufferedInputStream bufferedInputStream = new BufferedInputStream(byteArrayInputStream);
// 이거랑
byte[] buffer = new byte[8192];
try {
byteArrayInputStream.read(buffer);
} catch(IOException e) {}
// 이거랑 차이가 뭐임?
try {
bufferedInputStream.read();
} catch (IOException e) {}
}
}
import java.io.ByteArrayInputStream;
import java.io.IOException;
public class M {
public static void main(String[] args) {
byte[] bytes = new byte[]{1, 2, 3};
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes);
BufferedInputStream bufferedInputStream = new BufferedInputStream(byteArrayInputStream);
// 이거랑
byte[] buffer = new byte[8192];
try {
byteArrayInputStream.read(buffer);
} catch(IOException e) {}
// 이거랑 차이가 뭐임?
try {
bufferedInputStream.read();
} catch (IOException e) {}
}
}
댓글 0