Added DNS response TC
This commit is contained in:
parent
31a47f52cd
commit
ea206cc5b5
4 changed files with 90 additions and 19 deletions
|
|
@ -65,6 +65,17 @@ public class Converter {
|
|||
(byte)((num >> 16)& 0xff),
|
||||
(byte)((num >> 24)& 0xff)};
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a char array to a byte array.
|
||||
*
|
||||
* @return a byte array with the same binary value as the char.
|
||||
*/
|
||||
public static byte[] toBytes(char[] arr){
|
||||
byte[] ret = new byte[arr.length];
|
||||
System.arraycopy(arr, 0, ret, 0, arr.length);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a Integer to a byte
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue