Do I need there to explicitly writer.flush() or not? I think that after leaving save() method writer may not write data to the outputStream
import java.io.*;
public class Test
{
public int i = 5;
public void save(OutputStream outputStream) throws Exception
{
PrintWriter writer = new PrintWriter(outputStream);
writer.println(i);
writer.flush(); // necessarily or not?
}
}