import java.io.*; import javax.microedition.io.Connector; import javax.microedition.io.file.FileConnection; import javax.microedition.lcdui.*; import java.lang.*; public class FileTools { static byte [] b; static String strload; int up; public FileTools(String path, String mode, String strupload) { load(path,strupload); } void load(String path,String strupload){ try { byte [] b = strupload.getBytes("windows-1251"); FileConnection fc=(FileConnection) Connector.open(path); fc.delete(); fc.create(); DataOutputStream dos = fc.openDataOutputStream(); dos.write(b,0,strupload.length()); fc.close(); dos.close();} catch (Exception exc) { }} }