我没有收到任何错误,但我的代码没有将任何新数据保存到文本文件中,这是我的代码:
public void saveToLeaderboard() throws IOException {
String toSave = "Random info I want to save";
HttpConnection connection = null;
connection = (HttpConnection) Connector.open("EXTERNAL URL", Connector.READ_WRITE, true);
connection.setRequestMethod(HttpConnection.POST);
DataOutputStream out = new DataOutputStream(connection.openDataOutputStream());
out.writeUTF(toSave);
out.flush();
connection.close();
}
我究竟做错了什么?