# InputStreamReader相關方法 Given that course.txt is accessible and contains: **Course : : Java** and given the code fragment: ```java= public static void main(String[] args) { int i; char c; try (FileInputStream fis = new FileInputStream ("C:\\Users\\A7024\\git-sideProject\\exam.ocpjp\\course.txt"); InputStreamReader isr = new InputStreamReader(fis);) { while (isr.ready()) { //line n1 isr.skip(2); i = isr.read (); c = (char) i; System.out.print(c); } } catch (Exception e) { e.printStackTrace(); } } ``` **Console:** ``` ueJa ``` :::info InputStreamReader.ready() 通知此流是否已準備好被讀取 InputStreamReader.skip() 從此輸入流中跳過並丟棄n個字節的數據 ::: ###### tags: `ocpjp`