ÆÄÀÏÀ» ¹ÙÀÌÆ® ¹è¿­·Î Àб⠿¹Á¦ (ÀÌ°É·Î º¸¼¼¿ä!)


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :±èÇÊÈ£ 1999³â 10¿ù 12ÀÏ 19:05:11

In Reply to: [Re][Re][Áú¹®:±ÞÇÕ´Ï´Ù.]È­ÀÏÀÇ ³»¿ëÀ» byte¹è¿­·Î ¿Å±æ¶§ ¿¡·¯ ¹®ÀÇ posted by ¼ÛÄ¡ºÀ on 1999³â 10¿ù 12ÀÏ 15:04:02:

ObjectInputStream ´ë½Å DataInputStream À» »ç¿ëÇÑ °ÍÀÔ´Ï´Ù.


import java.io.*;


public class ByteReadTest {


public static void main(String[] args) {
byte b1[];
int tmp;


if (args.length > 0) {
try {
File file = new File(args[0]);


b1 = new byte[(int) file.length()];


FileInputStream istream = new FileInputStream(file);
DataInputStream in = new DataInputStream(istream);


for (int i=0; i < b1.length; i++)
b1[i] = (byte) in.read();
in.close();


for (int i=0; i < b1.length; i++)
System.out.print(b1[i] + ", ");
System.out.println();
}
catch (FileNotFoundException ex) {
System.out.println("Warning: The file " + args[0] + " is not found.");
}
catch (IOException ex) {
System.out.println("Warning: IOException");
ex.printStackTrace();
}
}
}
}





´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]