Java Byte Array Create toByteArrayV4(String address)

Here you can find the source of toByteArrayV4(String address)

Description

to Byte Array V

License

Open Source License

Parameter

Parameter Description
address a parameter

Return

value

Declaration

private static byte[] toByteArrayV4(String address) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from w  w w  .  j  ava2s.  c o  m
     * @param address
     * @return value
     */
    private static byte[] toByteArrayV4(String address) {
        String[] tokens = address.split("\\.");
        byte[] value = new byte[4];
        for (int index = 0; index < 4; index++) {
            value[index] = (byte) Integer.parseInt(tokens[index]);
        }
        return value;
    }
}

Related

  1. toByteArrayNoConversion(String textz)
  2. toByteArrays(String s)
  3. toByteArrayShifted(int... arguments)
  4. toByteArrayShifted2(int[][] intArray)
  5. ToByteArrayString(byte[] bytes)
  6. toByteArrayV6(String address)
  7. toByteInfo(long bytes)
  8. toBytes(boolean[] input)
  9. toBytes(byte data)