private byte[][] extractIPsAndSubnetMasks(byte[] ipWithSubmask1,byte[] ipWithSubmask2){
  int ipLength=ipWithSubmask1.length / 2;
  byte ip1[]=new byte[ipLength];
  byte subnetmask1[]=new byte[ipLength];
  System.arraycopy(ipWithSubmask1,0,ip1,0,ipLength);
  System.arraycopy(ipWithSubmask1,ipLength,subnetmask1,0,ipLength);
  byte ip2[]=new byte[ipLength];
  byte subnetmask2[]=new byte[ipLength];
  System.arraycopy(ipWithSubmask2,0,ip2,0,ipLength);
  System.arraycopy(ipWithSubmask2,ipLength,subnetmask2,0,ipLength);
  return new byte[][]{ip1,subnetmask1,ip2,subnetmask2};
}

private byte [ ] [ ] extractIPsAndSubnetMasks ( byte [ ] ipWithSubmask1 , byte [ ] ipWithSubmask2 ) { int ipLength = ipWithSubmask1 . length / 2 ; byte ip1 [ ] = new byte [ ipLength ] ; byte subnetmask1 [ ] = new byte [ ipLength ] ; System . arraycopy ( ipWithSubmask1 , 0 , ip1 , 0 , ipLength ) ; System . arraycopy ( ipWithSubmask1 , ipLength , subnetmask1 , 0 , ipLength ) ; byte ip2 [ ] = new byte [ ipLength ] ; byte subnetmask2 [ ] = new byte [ ipLength ] ; System . arraycopy ( ipWithSubmask2 , 0 , ip2 , 0 , ipLength ) ; System . arraycopy ( ipWithSubmask2 , ipLength , subnetmask2 , 0 , ipLength ) ; return new byte [ ] [ ] { ip1 , subnetmask1 , ip2 , subnetmask2 } ; }
splits the ip addresses and their subnet mask .
