mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:08:34 +00:00
Use unsynchronized buffered OutputStream for history (#2127)
* Use unsychronized buffered OutputStream * Add note * Avoid synchronization on DataOutputStream#write
This commit is contained in:
@ -20,6 +20,13 @@ public class FaweOutputStream extends DataOutputStream {
|
||||
return parent;
|
||||
}
|
||||
|
||||
// overwritten to un-synchronized
|
||||
@Override
|
||||
public void write(final int b) throws IOException {
|
||||
out.write(b);
|
||||
written++;
|
||||
}
|
||||
|
||||
public void write(int b, int amount) throws IOException {
|
||||
for (int i = 0; i < amount; i++) {
|
||||
write(b);
|
||||
|
Reference in New Issue
Block a user