예제 #1
1
파일: Csv.java 프로젝트: kanishin/Lealone
 private void initRead() throws IOException {
   if (input == null) {
     try {
       InputStream in = FileUtils.newInputStream(fileName);
       in = new BufferedInputStream(in, Constants.IO_BUFFER_SIZE);
       input = new InputStreamReader(in, characterSet);
     } catch (IOException e) {
       close();
       throw e;
     }
   }
   if (!input.markSupported()) {
     input = new BufferedReader(input);
   }
   input.mark(1);
   int bom = input.read();
   if (bom != 0xfeff) {
     // Microsoft Excel compatibility
     // ignore pseudo-BOM
     input.reset();
   }
   inputBuffer = new char[Constants.IO_BUFFER_SIZE * 2];
   if (columnNames == null) {
     readHeader();
   }
 }