Buffers & Writers (Readers)
- To not overload the underlying system/OS, it is recommended to use
Buffer
:
BufferedOutputStream bos = new BufferedOutputStream(fos);
...
bos.write(data);
bos.close();
- Next,
Writer
s, and Reader
s, are used to manipulate text rather than bytes
:
Writer writer = new OutputStreamWriter(bos);
writer.write("abc");
writer.close();
Nb. The preceding elements can be simplified by using FileWriter
.
try {
FileWriter f = new FileWriter("output.csv");
f.write("abc");
f.close();
} catch (Exception e) {
e.printStackTrace();
}
8 - 12Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented