Java String Encode encode(String text, String encoding)

Here you can find the source of encode(String text, String encoding)

Description

encode

License

LGPL

Declaration

public static String encode(String text, String encoding) throws UnsupportedEncodingException 

Method Source Code


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

import java.io.UnsupportedEncodingException;

import javax.mail.internet.MimeUtility;

public class Main {
    public static String encode(String text, String encoding) throws UnsupportedEncodingException {
        //print.ln(StringUtil.changeCharset(text,encoding));
        return MimeUtility.encodeText(text, encoding, "Q");
    }//from www  .  ja v  a 2 s . co m
}

Related

  1. encode(String src)
  2. encode(String src, String charset)
  3. encode(String str)
  4. encode(String str, int start, int end, Writer writer)
  5. encode(String text, String charset)
  6. encode(String text, String encoding)
  7. encode(String val, String encoding)
  8. encode(String value, String encoding)
  9. encodeBase64(String str)