Java ASCII asciiBytes(String x)

Here you can find the source of asciiBytes(String x)

Description

ascii Bytes

License

Open Source License

Declaration

public static byte[] asciiBytes(String x) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static byte[] asciiBytes(String x) {
        byte[] res = new byte[x.length()];
        for (int len = x.length(), i = 0; i < len; ++i)
            res[i] = (byte) x.charAt(i);
        return res;
    }//from w  w  w  .j a  v  a2 s .c  o m
}

Related

  1. ascii(final int c)
  2. ascii(String string)
  3. ascii2Bcd(byte[] asc)
  4. ascii2BCD(byte[] val, int len)
  5. AsciiBTAddressToBytes(String btAddress)
  6. asciiChar(int value)
  7. asciiChars()
  8. asciiCharToBytes(char[] chars)
  9. asciiDump(byte[] in)