Android File Util update

This commit is contained in:
Joe Bowser 2009-11-05 12:57:16 -08:00
parent d1db422ccf
commit 0b9ea56fc1

View File

@ -101,7 +101,7 @@ public class FileUtils {
return data;
}
public int write(String filename, String data)
public int write(String filename, String data, boolean append)
{
int i=0;
String FilePath="/sdcard/" + filename;
@ -109,7 +109,7 @@ public class FileUtils {
ByteArrayInputStream in = new ByteArrayInputStream(data.getBytes());
byte buff[] = new byte[1024];
FileOutputStream out=
new FileOutputStream(FilePath, true);
new FileOutputStream(FilePath, append);
do {
int numread = in.read(buff);
if (numread <= 0)