PJWSTK - MAS - WykÅad 05
PJWSTK - MAS - WykÅad 05
PJWSTK - MAS - WykÅad 05
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
System we/wyj (2)<br />
o Czytanie pliku linia po linii<br />
BufferedReader in = new BufferedReader(<br />
new FileReader("IOStreamDemo.java"));<br />
String s, s2 = new String();<br />
while((s = in.readLine())!= null)<br />
s2 += s + "\n";<br />
in.close();<br />
o Odczyt danych z pamięci<br />
StringReader in2 = new StringReader(s2);<br />
int c;<br />
while((c = in2.read()) != -1)<br />
System.out.print((char)c);<br />
Modelowanie i Analiza Systemów Informacyjnych (<strong>MAS</strong>), wykład 3 17