Java String to Byte Array convertStringToByte(String input)

Here you can find the source of convertStringToByte(String input)

Description

convert String To Byte

License

Open Source License

Declaration

public static byte[] convertStringToByte(String input) 

Method Source Code

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

public class Main {
    public static byte[] convertStringToByte(String input) {
        return input == null ? new byte[0] : input.getBytes();
    }//ww  w.  jav a  2  s.co  m
}

Related

  1. asBytes(String basicString)
  2. asBytes(String hex)
  3. asBytes(String hexStr)
  4. convertStringToByte(String strValue)
  5. convertStringToByteArray(String input)
  6. convertStringToByteArray(String string)
  7. convertStringToBytes(String string)