11. 19. 1. BufferedOutputStream |
|
You should always wrap your OutputStream with a BufferedOutputStream for better performance.
The BufferedOutputStream class has two constructors that accept an OutputStream. |
public BufferedOutputStream (OutputStream out)
public BufferedOutputStream (OutputStream out, int bufferSize)
|
|
The first constructor uses the default buffer size, the second lets you decide.
|
|
FileOutputStream fos = new FileOutputStream (aFile);
BufferedOutputStream bos = new BufferedOutputStream(fos);
|
|