Hi Guys,

i have written the following piece of code. and although it compiles and does not throw an exception, when executed. it creates the file for the buffered output stream, but when i open the output file it is empty and no data has been written to it.

import java.io.*;

public class FileReader{
	public static void main(String[] args) throws Exception{
		String strFrmFile=args[0];
		String strToFile="/Users/me/Desktop/FileReader/"+args[1];

		byte bytBuf[]=new byte[1024];
		int intOfst=0;
		int intBytRd=0;

		BufferedInputStream bis=new BufferedInputStream(new FileInputStream(strFrmFile));
		BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream(strToFile));




		System.out.println("FileReader: "+strFrmFile+" copied to "+strToFile);
admittedly, i thought that i understood what the second argument of the read() and write() methods (i.e. the offset parameters) were for, but now I am not so sure, so i might not be using them correctly. i would be very greatful for any help.

thanks in advance,

- user0182