Java InetAddress inetAddrToByteArray(InetAddress a)

Here you can find the source of inetAddrToByteArray(InetAddress a)

Description

inet Addr To Byte Array

License

Open Source License

Declaration

public static byte[] inetAddrToByteArray(InetAddress a) 

Method Source Code

//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();
    }
}

Related

  1. inetAddressCompare(final InetAddress address1, final InetAddress address2)
  2. inetAddressesComparator(final boolean sameHost)
  3. inetAddressesCompare(final InetAddress[] addresses1, final InetAddress[] addresses2)
  4. inetAddressFromThriftString(String ipAddress)
  5. inetAddressGt(InetAddress a, InetAddress b)
  6. newInterfaceAddress(InetAddress inetAddress, short maskLength)
  7. normalizeHostAddress(final InetAddress localHost)
  8. parseInetAddressFromString(String input)
  9. readInetAddress(final DataInput in, final boolean fixedLength)