@@ -64,7 +64,7 @@ public String simpleRead(String name) throws IOException {
64
64
List <Byte > header = new ArrayList <>();
65
65
List <Byte > block = new ArrayList <>();
66
66
67
- byte hbyte = (byte ) ((cmd .length >> 8 ) & 0xff00 );
67
+ byte hbyte = (byte ) ((cmd .length & 0xff00 )>> 8 );
68
68
byte lbyte = (byte ) (cmd .length & 0x00ff );
69
69
70
70
int index = 0 ;
@@ -74,10 +74,10 @@ public String simpleRead(String name) throws IOException {
74
74
for (int i = 0 ; i < cmd .length ; i ++) {
75
75
block .add (index ++, cmd [i ]);
76
76
}
77
- hbyte = (byte ) ((block .size () >> 8 ) & 0xff00 );
77
+ hbyte = (byte ) ((block .size () & 0xff00 )>> 8 );
78
78
lbyte = (byte ) (block .size () & 0x00ff );
79
79
80
- byte hbytemsg = (byte ) ((id >> 8 ) & 0xff00 );
80
+ byte hbytemsg = (byte ) ((id & 0xff00 )>> 8 );
81
81
byte lbytemsg = (byte ) (id & 0x00ff );
82
82
83
83
index = 0 ;
@@ -123,7 +123,7 @@ public String simpleWrite(String name, String val) throws IOException {
123
123
List <Byte > header = new ArrayList <>();
124
124
List <Byte > block = new ArrayList <>();
125
125
126
- byte hbyte = (byte ) ((cmd .length >> 8 ) & 0xff00 );
126
+ byte hbyte = (byte ) ((cmd .length & 0xff00 )>> 8 );
127
127
byte lbyte = (byte ) (cmd .length & 0x00ff );
128
128
129
129
int index = 0 ;
@@ -134,7 +134,7 @@ public String simpleWrite(String name, String val) throws IOException {
134
134
block .add (index ++, cmd [i ]);
135
135
}
136
136
137
- hbyte = (byte ) ((value .length >> 8 ) & 0xff00 );
137
+ hbyte = (byte ) ((value .length & 0xff00 )>> 8 );
138
138
lbyte = (byte ) (value .length & 0x00ff );
139
139
140
140
block .add (index ++, hbyte );
@@ -143,10 +143,10 @@ public String simpleWrite(String name, String val) throws IOException {
143
143
block .add (index ++, value [i ]);
144
144
}
145
145
146
- hbyte = (byte ) ((block .size () >> 8 ) & 0xff00 );
146
+ hbyte = (byte ) ((block .size () & 0xff00 )>> 8 );
147
147
lbyte = (byte ) (block .size () & 0x00ff );
148
148
149
- byte hbytemsg = (byte ) ((id >> 8 ) & 0xff00 );
149
+ byte hbytemsg = (byte ) ((id & 0xff00 )>> 8 );
150
150
byte lbytemsg = (byte ) (id & 0x00ff );
151
151
152
152
index = 0 ;
0 commit comments