BufferedOutputStream : BufferedOutputStream « File « Java Tutorial






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);








11.19.BufferedOutputStream
11.19.1.BufferedOutputStream
11.19.2.Create DataOutputStream out of BufferedOutputStream
11.19.3.Create DataInputStream out of BufferedInputStream
11.19.4.Write to file using BufferedOutputStream
11.19.5.Write byte array to file using BufferedOutputStream
11.19.6.Write byte to file using BufferedOutputStream
11.19.7.Append string to a text file