欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

有关MimeUtility

程序员文章站 2022-07-13 11:35:24
...
import java.io.UnsupportedEncodingException;
import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility;

public class Test {
	public static void main(String args[]) throws UnsupportedEncodingException {

		String subject = "申银万国_新股定价_300158(N振东)_娄圣睿,罗鶄_**_预计上市首日股价39-44元。 ";
		String encodedString = MimeUtility.encodeText(subject, "gbk", "b");
		String decodedString = MimeUtility.decodeText(encodedString);
		
		System.out.println(decodedString);
		
	}
}

 

from csdn: http://topic.csdn.net/u/20110222/12/08439bb8-9b2e-4145-a4e0-c9c02f800b51.html

it's about base64 encoding, just the usage.