Android String to Byte Array Convert stringToByteString(String string)

Here you can find the source of stringToByteString(String string)

Description

string To Byte String

License

Open Source License

Declaration

public static ByteString stringToByteString(String string) 

Method Source Code

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

import com.google.protobuf.ByteString;

public class Main {
    public static ByteString stringToByteString(String string) {
        return ByteString.copyFromUtf8(string);
    }// w  w w .  ja  v  a  2s .com
}

Related

  1. Str2Bcd(String asc)
  2. toBytes(String digits, int radix)
  3. toBytes(String hexString)
  4. toBytes(String hexString)
  5. toBytes(String s)