File f = new File("./test.OC");
InputStreamReader reader = new InputStreamReader(new FileInputStream(f), "UTF-16");
BufferedReader in = new BufferedReader(read);
String str;
while (( str = in.readLine()) != null)
{
String s[] = str.split(",");
System.out.println(str);
System.out.println(s[0].length());
}
이렇게 하면 s[0].length 가 정확히 10이 찍힘.
'Language > 자바' 카테고리의 다른 글
자바 String/lang/v 이런 에러 (0) | 2017.03.31 |
---|---|
[ASM] ASM 통해 ClassFile 만들기 (ASM 예제도 있음) (0) | 2017.02.21 |
[Java] Entity annotation (0) | 2017.01.05 |
[Java] Java Memory Leaks et al. [2. Act] (0) | 2016.12.19 |
[Java] The Java Memory Architecture [1.Act] (0) | 2016.12.19 |