Remove redundant bitwise operations
See gh-22212
This commit is contained in:
committed by
Andy Wilkinson
parent
a118668212
commit
de46d4bfd3
@@ -72,12 +72,12 @@ class Frame {
|
||||
void write(OutputStream outputStream) throws IOException {
|
||||
outputStream.write(0x80 | this.type.code);
|
||||
if (this.payload.length < 126) {
|
||||
outputStream.write(0x00 | (this.payload.length & 0x7F));
|
||||
outputStream.write(this.payload.length & 0x7F);
|
||||
}
|
||||
else {
|
||||
outputStream.write(0x7E);
|
||||
outputStream.write(this.payload.length >> 8 & 0xFF);
|
||||
outputStream.write(this.payload.length >> 0 & 0xFF);
|
||||
outputStream.write(this.payload.length & 0xFF);
|
||||
}
|
||||
outputStream.write(this.payload);
|
||||
outputStream.flush();
|
||||
|
||||
Reference in New Issue
Block a user