`

无聊写的io跳过第一行

    博客分类:
  • java
 
阅读更多
public void csvOpenWithReader(InputStreamReader reader) {

		BufferedReader bufferedreader = new BufferedReader(reader);
		int lineDel = 1;// 跳过第几行 
		int line = 0; 
		String stemp;
		try {
			while ((stemp = bufferedreader.readLine()) != null) {
				line++;
				if(line==lineDel) continue;
				if (stemp.trim().length() > 0) {
					// System.out.println(stemp);// 分割字符串
					BzptBook book = splitStringToBook(stemp);
					this.bzptbookmanager.saveBzptBook(book);
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics