@Test public void testInt2bytesCropp() throws Exception { assertArrayEquals(new byte[] {}, ArraysUtil.int2bytesCropp(960488, 4)); assertArrayEquals(new byte[] {0, 127}, ArraysUtil.int2bytesCropp(127, 2)); assertArrayEquals(new byte[] {0, 39, 17, -24}, ArraysUtil.int2bytesCropp(2560488, 0)); }
public static byte[] int2bytesCropp(int value, int nbytes2cropp) { byte[] _value = int2bytes(value); return Arrays.copyOfRange(_value, nbytes2cropp, _value.length); }
ArraysUtil { public static byte[] int2bytesCropp(int value, int nbytes2cropp) { byte[] _value = int2bytes(value); return Arrays.copyOfRange(_value, nbytes2cropp, _value.length); } }
ArraysUtil { public static byte[] int2bytesCropp(int value, int nbytes2cropp) { byte[] _value = int2bytes(value); return Arrays.copyOfRange(_value, nbytes2cropp, _value.length); } private  ArraysUtil(); }
ArraysUtil { public static byte[] int2bytesCropp(int value, int nbytes2cropp) { byte[] _value = int2bytes(value); return Arrays.copyOfRange(_value, nbytes2cropp, _value.length); } private  ArraysUtil(); static BitSet getBitAddress(String ip); static int bytes2int(byte[] bytes); static byte[] combine(byte[]... bytes); static byte convertBits(Boolean... bits); static byte[] copy(byte[] source); static int getBit(byte _byte, int position); static byte[] int2bytes(int value); static byte[] int2bytesCropp(int value, int nbytes2cropp); static byte[] readBytes(byte[] source, int start); static byte[] readBytes(byte[] source, int start, int length); static byte reverseBitsByte(byte x); static byte setBit(byte _byte, int position, boolean value); }
ArraysUtil { public static byte[] int2bytesCropp(int value, int nbytes2cropp) { byte[] _value = int2bytes(value); return Arrays.copyOfRange(_value, nbytes2cropp, _value.length); } private  ArraysUtil(); static BitSet getBitAddress(String ip); static int bytes2int(byte[] bytes); static byte[] combine(byte[]... bytes); static byte convertBits(Boolean... bits); static byte[] copy(byte[] source); static int getBit(byte _byte, int position); static byte[] int2bytes(int value); static byte[] int2bytesCropp(int value, int nbytes2cropp); static byte[] readBytes(byte[] source, int start); static byte[] readBytes(byte[] source, int start, int length); static byte reverseBitsByte(byte x); static byte setBit(byte _byte, int position, boolean value);  }