Java Code:
public void writeFile()
	 {
	 	try
		{
			FileWriter smallWrite = new FileWriter("small.txt");
			BufferedWriter smallBuff = new BufferedWriter(smallWrite);
			smallBuff.write("Account no: " + accID+"\n");
        	smallBuff.write("Customer Name: "+name+"\n");
       	smallBuff.write("Address: "+address+"\n");
        	smallBuff.write("Date of Birth: "+dob+"\n");
        	smallBuff.write("Phone: " +phone+"\n");
		  	smallBuff.write("Avaliable Balance: "+accBalance+"\n");
		  	smallWrite.close();
			smallBuff.close();

		}
		catch ( IOException e )
		{
			System.out.println("Error... " +e.getMessage());
			e.printStackTrace();
			System.exit(0);
		}
		
	 }
i got the following error:

Java Code:
Error... Stream closed
java.io.IOException: Stream closed
	at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:26)
	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:99)
	at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
	at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)
	at java.io.BufferedWriter.close(BufferedWriter.java:246)
	at Customers.writeFile(Customers.java:114)
	at Lab2.main(Lab2.java:22)
any1 know what is this error about and how do i solve it???