BufferedWriter を使用して、データをテキストファイルに書き込みます。ODBC を使用して Access に書き込むよりも高速です。コードは次のようになります。
BufferedWriter bw = new BufferedWriter(new FileWriter(new File(filePath), true));
True は、BufferedWriter を上書きではなく、追加することです。
bw.append(
country + "\t" +
scenario + "\t" +
tempStage + "\t" +
year + "\t" +
tempState
);
以前のプロジェクトでうまくいきました。新しい問題: 列の途中でクラップアウトするだけです。これは良い行です:
SultanateOfBrunei BeeBeeScenario Other 2019
通常、最後の行は次のようになります。
SultanateOfBrunei BeeBeeScenario Other 2019 Nondyna
またはスルタ
またはすう
そのような奇妙な不完全な行を無視するエラー処理コードを入れました。
This means not all the data is being written. I can give up one datum, no problem... But it appears to be cutting out more. The simulation runs 1990 to the end of 2020 and it typically craps out somewhere in 2019. Increasing the VM helps a little-- it gets further. But I only have a certain amount of memory!
Any insights?
Thanks!!