Java Binary Encode toBinaryID(final String id)

Here you can find the source of toBinaryID(final String id)

Description

to Binary ID

License

BSD License

Declaration

public static byte[] toBinaryID(final String id) 

Method Source Code

//package com.java2s;
//License from project: BSD License 

public class Main {
    public static byte[] toBinaryID(final String id) {
        final int length = id.length();
        final byte[] result = new byte[length];
        for (int i = 0; i < length; i++) {
            result[i] = Byte.parseByte(Character.toString(id.charAt(i)));
        }/*from  ww  w  . j a va 2  s .  co m*/
        return result;
    }
}

Related

  1. toBinaryArray(int integer, int size)
  2. toBinaryBoolean(boolean source)
  3. toBinaryChar(boolean bit)
  4. toBinaryClassName(String fileName)
  5. toBinaryFromHex(byte ch)
  6. toBinaryIeee754String(long decimal)
  7. toBinaryIntArray(byte[] bytes, int bitOffset, int bitCount)
  8. toBinaryName(String className)
  9. toBinaryString(boolean[] array)