Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
po:lab6 [2017/11/30 13:25] pszwed [Do zaimplementowania] |
po:lab6 [2018/11/22 13:40] pszwed [Funkcje getTime i getDate] |
||
---|---|---|---|
Line 247: | Line 247: | ||
+ | ===== Zestaw znaków ===== | ||
+ | Poniższy kod pokazuje, jak odczytać/ | ||
+ | |||
+ | <code java> | ||
+ | try (BufferedReader input = new BufferedReader(new InputStreamReader( new FileInputStream(inname), | ||
+ | try(PrintWriter output = new PrintWriter( new OutputStreamWriter(new FileOutputStream(outname)," | ||
+ | for(;;){ | ||
+ | String line = input.readLine(); | ||
+ | if(line==null)break; | ||
+ | output.println(line); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ |