forked from I2P_Developers/i2p.i2p
Replaces instances of getBytes() in router classes
This commit is contained in:
@@ -10,6 +10,7 @@ import java.util.Queue;
|
||||
import java.util.TimeZone;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.data.TunnelId;
|
||||
import net.i2p.data.i2np.I2NPMessage;
|
||||
@@ -40,7 +41,7 @@ public class MessageHistory {
|
||||
//private SubmitMessageHistoryJob _submitMessageHistoryJob;
|
||||
private volatile boolean _firstPass;
|
||||
|
||||
private final static byte[] NL = System.getProperty("line.separator").getBytes();
|
||||
private final static byte[] NL = DataHelper.getUTF8(System.getProperty("line.separator"));
|
||||
private final static int FLUSH_SIZE = 1000; // write out at least once every 1000 entries
|
||||
|
||||
/** config property determining whether we want to debug with the message history - default false */
|
||||
@@ -636,7 +637,7 @@ public class MessageHistory {
|
||||
fos = new SecureFileOutputStream(f, true);
|
||||
String entry;
|
||||
while ((entry = _unwrittenEntries.poll()) != null) {
|
||||
fos.write(entry.getBytes());
|
||||
fos.write(DataHelper.getUTF8(entry));
|
||||
fos.write(NL);
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
|
Reference in New Issue
Block a user