proxy progress
This commit is contained in:
parent
0aca139b74
commit
af270cd164
|
@ -11,4 +11,18 @@ public interface WriteStream {
|
|||
* this blocking method would transmit the outgoing bytes
|
||||
*/
|
||||
void write(byte[] bytes) throws IOException;
|
||||
|
||||
default void write(byte value) throws IOException {
|
||||
write(new byte[]{value});
|
||||
}
|
||||
|
||||
default void writeInt(int v) throws IOException {
|
||||
byte[] array = new byte[4];
|
||||
|
||||
array[0] = (byte) ((v >>> 24) & 0xFF);
|
||||
array[0] = (byte) ((v >>> 16) & 0xFF);
|
||||
array[0] = (byte) ((v >>> 8) & 0xFF);
|
||||
array[0] = (byte) ((v >>> 0) & 0xFF);
|
||||
write(array);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue