Here you can find the source of inetAddrToByteArray(InetAddress a)
public static byte[] inetAddrToByteArray(InetAddress a)
//package com.java2s; /*/*from ww w . j a v a2 s . co m*/ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ import java.net.InetAddress; public class Main { public static byte[] inetAddrToByteArray(InetAddress a) { return a.getAddress(); } }