Android String Decode decode(String str)

Here you can find the source of decode(String str)

Description

Converts from String to byte array

License

Open Source License

Parameter

Parameter Description
str - The String to be decoded

Return

- The returned byte array

Declaration

public static byte[] decode(String str) 

Method Source Code

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

import android.util.Base64;

public class Main {
    /**//w  w w  . j  av a2s  .c  o m
     * Converts from String to byte array
     * @param str - The String to be decoded
     * @return - The returned byte array
     */
    public static byte[] decode(String str) {
        return Base64.decode(str.getBytes(), Base64.DEFAULT);
    }
}

Related

  1. decode(String sourceStr, String compareStr, String returnStr, String defaultStr)
  2. decode(String str)
  3. decode(String str)
  4. decode(String base64)
  5. decode(String source)
  6. decode(String str)
  7. decode(String s)
  8. decode(String str)
  9. decode(String base64)