Read and write text file in Java

Short for text file ex.

// Reading...
StringBuffer sb = new StringBuffer();
FileInputStream fis = null;
Reader reader = null;
try
{
	fis = new FileInputStream("in.txt");
	reader = new BufferedReader(new InputStreamReader(fis,"UTF-8"));
	char[] buffer = new char[1024];
	int read;
	while ((read = reader.read(buffer,0,buffer.length)) > 0)
		sb.append(buffer,0,read);
}
finally
{
	if (reader != null)
		reader.close();
	if (fis != null)
		fis.close();
}

// Processing...
String res = sb.toString() + "...OK!";

// Writing...
FileOutputStream fos = null;
Writer writer = null;
try
{
	fos = new FileOutputStream("out.txt");
	writer = new BufferedWriter(new OutputStreamWriter(fos,"UTF-8"));
	writer.write(res);
}
finally
{
	if (writer != null)
		writer.close();
	if (fos != null)
		fos.close();
}

Greate for me.