亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mimeutility.java

?? java Email you can use it to send email to others
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
	return defaultJavaCharset;    }    /*     * Get the default MIME charset for this locale.     */    static String getDefaultMIMECharset() {	if (defaultMIMECharset == null) {	    try {		defaultMIMECharset = System.getProperty("mail.mime.charset");	    } catch (SecurityException ex) { }	// ignore it	}	if (defaultMIMECharset == null)	    defaultMIMECharset = mimeCharset(getDefaultJavaCharset());	return defaultMIMECharset;    }    // Tables to map MIME charset names to Java names and vice versa.    // XXX - Should eventually use J2SE 1.4 java.nio.charset.Charset    private static Hashtable mime2java;    private static Hashtable java2mime;    static {	java2mime = new Hashtable(40);	mime2java = new Hashtable(10);	try {	    // Use this class's classloader to load the mapping file	    // XXX - we should use SecuritySupport, but it's in another package	    InputStream is = 		    javax.mail.internet.MimeUtility.class.getResourceAsStream(		    "/META-INF/javamail.charset.map");	    if (is != null) {		try {		    is = new LineInputStream(is);		    // Load the JDK-to-MIME charset mapping table		    loadMappings((LineInputStream)is, java2mime);		    // Load the MIME-to-JDK charset mapping table		    loadMappings((LineInputStream)is, mime2java);		} finally {		    try {			is.close();		    } catch (Exception cex) {			// ignore		    }		}	    }	} catch (Exception ex) { }	// If we didn't load the tables, e.g., because we didn't have	// permission, load them manually.  The entries here should be	// the same as the default javamail.charset.map.	if (java2mime.isEmpty()) {	    java2mime.put("8859_1", "ISO-8859-1");	    java2mime.put("iso8859_1", "ISO-8859-1");	    java2mime.put("iso8859-1", "ISO-8859-1");	    java2mime.put("8859_2", "ISO-8859-2");	    java2mime.put("iso8859_2", "ISO-8859-2");	    java2mime.put("iso8859-2", "ISO-8859-2");	    java2mime.put("8859_3", "ISO-8859-3");	    java2mime.put("iso8859_3", "ISO-8859-3");	    java2mime.put("iso8859-3", "ISO-8859-3");	    java2mime.put("8859_4", "ISO-8859-4");	    java2mime.put("iso8859_4", "ISO-8859-4");	    java2mime.put("iso8859-4", "ISO-8859-4");	    java2mime.put("8859_5", "ISO-8859-5");	    java2mime.put("iso8859_5", "ISO-8859-5");	    java2mime.put("iso8859-5", "ISO-8859-5");	    java2mime.put("8859_6", "ISO-8859-6");	    java2mime.put("iso8859_6", "ISO-8859-6");	    java2mime.put("iso8859-6", "ISO-8859-6");	    java2mime.put("8859_7", "ISO-8859-7");	    java2mime.put("iso8859_7", "ISO-8859-7");	    java2mime.put("iso8859-7", "ISO-8859-7");	    java2mime.put("8859_8", "ISO-8859-8");	    java2mime.put("iso8859_8", "ISO-8859-8");	    java2mime.put("iso8859-8", "ISO-8859-8");	    java2mime.put("8859_9", "ISO-8859-9");	    java2mime.put("iso8859_9", "ISO-8859-9");	    java2mime.put("iso8859-9", "ISO-8859-9");	    java2mime.put("sjis", "Shift_JIS");	    java2mime.put("jis", "ISO-2022-JP");	    java2mime.put("iso2022jp", "ISO-2022-JP");	    java2mime.put("euc_jp", "euc-jp");	    java2mime.put("koi8_r", "koi8-r");	    java2mime.put("euc_cn", "euc-cn");	    java2mime.put("euc_tw", "euc-tw");	    java2mime.put("euc_kr", "euc-kr");	}	if (mime2java.isEmpty()) {	    mime2java.put("iso-2022-cn", "ISO2022CN");	    mime2java.put("iso-2022-kr", "ISO2022KR");	    mime2java.put("utf-8", "UTF8");	    mime2java.put("utf8", "UTF8");	    mime2java.put("ja_jp.iso2022-7", "ISO2022JP");	    mime2java.put("ja_jp.eucjp", "EUCJIS");	    mime2java.put("euc-kr", "KSC5601");	    mime2java.put("euckr", "KSC5601");	    mime2java.put("us-ascii", "ISO-8859-1");	    mime2java.put("x-us-ascii", "ISO-8859-1");	}    }    private static void loadMappings(LineInputStream is, Hashtable table) {	String currLine;	while (true) {	    try {		currLine = is.readLine();	    } catch (IOException ioex) {		break; // error in reading, stop	    }	    if (currLine == null) // end of file, stop		break;	    if (currLine.startsWith("--") && currLine.endsWith("--"))		// end of this table		break;		    // ignore empty lines and comments	    if (currLine.trim().length() == 0 || currLine.startsWith("#"))		continue;	    	    // A valid entry is of the form <key><separator><value>	    // where, <separator> := SPACE | HT. Parse this	    StringTokenizer tk = new StringTokenizer(currLine, " \t");	    try {		String key = tk.nextToken();		String value = tk.nextToken();		table.put(key.toLowerCase(Locale.ENGLISH), value);	    } catch (NoSuchElementException nex) { }	}    }    static final int ALL_ASCII 		= 1;    static final int MOSTLY_ASCII 	= 2;    static final int MOSTLY_NONASCII 	= 3;    /**      * Check if the given string contains non US-ASCII characters.     * @param	s	string     * @return		ALL_ASCII if all characters in the string      *			belong to the US-ASCII charset. MOSTLY_ASCII     *			if more than half of the available characters     *			are US-ASCII characters. Else MOSTLY_NONASCII.     */    static int checkAscii(String s) {	int ascii = 0, non_ascii = 0;	int l = s.length();	for (int i = 0; i < l; i++) {	    if (nonascii((int)s.charAt(i))) // non-ascii		non_ascii++;	    else		ascii++;	}	if (non_ascii == 0)	    return ALL_ASCII;	if (ascii > non_ascii)	    return MOSTLY_ASCII;	return MOSTLY_NONASCII;    }    /**      * Check if the given byte array contains non US-ASCII characters.     * @param	b	byte array     * @return		ALL_ASCII if all characters in the string      *			belong to the US-ASCII charset. MOSTLY_ASCII     *			if more than half of the available characters     *			are US-ASCII characters. Else MOSTLY_NONASCII.     *     * XXX - this method is no longer used     */    static int checkAscii(byte[] b) {	int ascii = 0, non_ascii = 0;	for (int i=0; i < b.length; i++) {	    // The '&' operator automatically causes b[i] to be promoted	    // to an int, and we mask out the higher bytes in the int 	    // so that the resulting value is not a negative integer.	    if (nonascii(b[i] & 0xff)) // non-ascii		non_ascii++;	    else		ascii++;	}		if (non_ascii == 0)	    return ALL_ASCII;	if (ascii > non_ascii)	    return MOSTLY_ASCII;		return MOSTLY_NONASCII;    }    /**      * Check if the given input stream contains non US-ASCII characters.     * Upto <code>max</code> bytes are checked. If <code>max</code> is     * set to <code>ALL</code>, then all the bytes available in this     * input stream are checked. If <code>breakOnNonAscii</code> is true     * the check terminates when the first non-US-ASCII character is     * found and MOSTLY_NONASCII is returned. Else, the check continues     * till <code>max</code> bytes or till the end of stream.     *     * @param	is	the input stream     * @param	max	maximum bytes to check for. The special value     *			ALL indicates that all the bytes in this input     *			stream must be checked.     * @param	breakOnNonAscii if <code>true</code>, then terminate the     *			the check when the first non-US-ASCII character     *			is found.     * @return		ALL_ASCII if all characters in the string      *			belong to the US-ASCII charset. MOSTLY_ASCII     *			if more than half of the available characters     *			are US-ASCII characters. Else MOSTLY_NONASCII.     */    static int checkAscii(InputStream is, int max, boolean breakOnNonAscii) {	int ascii = 0, non_ascii = 0;	int len;	int block = 4096;	int linelen = 0;	boolean longLine = false, badEOL = false;	boolean checkEOL = encodeEolStrict && breakOnNonAscii;	byte buf[] = null;	if (max != 0) {	    block = (max == ALL) ? 4096 : Math.min(max, 4096);	    buf = new byte[block]; 	}	while (max != 0) {	    try {		if ((len = is.read(buf, 0, block)) == -1)		    break;		int lastb = 0;		for (int i = 0; i < len; i++) {	    	    // The '&' operator automatically causes b[i] to 		    // be promoted to an int, and we mask out the higher		    // bytes in the int so that the resulting value is 		    // not a negative integer.		    int b = buf[i] & 0xff;		    if (checkEOL &&			    ((lastb == '\r' && b != '\n') ||			    (lastb != '\r' && b == '\n')))			badEOL = true;		    if (b == '\r' || b == '\n')			linelen = 0;		    else {			linelen++;			if (linelen > 998)	// 1000 - CRLF			    longLine = true;		    }		    if (nonascii(b)) {	// non-ascii		        if (breakOnNonAscii) // we are done			    return MOSTLY_NONASCII;		        else			    non_ascii++;		    } else		        ascii++;		    lastb = b;		}	    } catch (IOException ioex) {		break;	    }	    if (max != ALL)		max -= len;	}	if (max == 0 && breakOnNonAscii)	    // We have been told to break on the first non-ascii character.	    // We haven't got any non-ascii character yet, but then we	    // have not checked all of the available bytes either. So we	    // cannot say for sure that this input stream is ALL_ASCII,	    // and hence we must play safe and return MOSTLY_NONASCII	    return MOSTLY_NONASCII;	if (non_ascii == 0) { // no non-us-ascii characters so far	    // If we're looking at non-text data, and we saw CR without LF	    // or vice versa, consider this mostly non-ASCII so that it	    // will be base64 encoded (since the quoted-printable encoder	    // doesn't encode this case properly).	    if (badEOL)		return MOSTLY_NONASCII;	    // if we've seen a long line, we degrade to mostly ascii	    else if (longLine)		return MOSTLY_ASCII;	    else		return ALL_ASCII;	}	if (ascii > non_ascii) // mostly ascii	    return MOSTLY_ASCII;	return MOSTLY_NONASCII;    }    static final boolean nonascii(int b) {	return b >= 0177 || (b < 040 && b != '\r' && b != '\n' && b != '\t');    }}/** * An OutputStream that determines whether the data written to * it is all ASCII, mostly ASCII, or mostly non-ASCII. */class AsciiOutputStream extends OutputStream {    private boolean breakOnNonAscii;    private int ascii = 0, non_ascii = 0;    private int linelen = 0;    private boolean longLine = false;    private boolean badEOL = false;    private boolean checkEOL = false;    private int lastb = 0;    private int ret = 0;    public AsciiOutputStream(boolean breakOnNonAscii, boolean encodeEolStrict) {	this.breakOnNonAscii = breakOnNonAscii;	checkEOL = encodeEolStrict && breakOnNonAscii;    }    public void write(int b) throws IOException {	check(b);    }    public void write(byte b[]) throws IOException {	write(b, 0, b.length);    }    public void write(byte b[], int off, int len) throws IOException {	len += off;	for (int i = off; i < len ; i++)	    check(b[i]);    }    private final void check(int b) throws IOException {	b &= 0xff;	if (checkEOL &&		((lastb == '\r' && b != '\n') || (lastb != '\r' && b == '\n')))	    badEOL = true;	if (b == '\r' || b == '\n')	    linelen = 0;	else {	    linelen++;	    if (linelen > 998)	// 1000 - CRLF		longLine = true;	}	if (MimeUtility.nonascii(b)) { // non-ascii	    non_ascii++;	    if (breakOnNonAscii) {	// we are done		ret = MimeUtility.MOSTLY_NONASCII;		throw new EOFException();	    }	} else	    ascii++;	lastb = b;    }    /**     * Return ASCII-ness of data stream.     */    public int getAscii() {	if (ret != 0)	    return ret;	// If we're looking at non-text data, and we saw CR without LF	// or vice versa, consider this mostly non-ASCII so that it	// will be base64 encoded (since the quoted-printable encoder	// doesn't encode this case properly).	if (badEOL)	    return MimeUtility.MOSTLY_NONASCII;	else if (non_ascii == 0) { // no non-us-ascii characters so far	    // if we've seen a long line, we degrade to mostly ascii	    if (longLine)		return MimeUtility.MOSTLY_ASCII;	    else		return MimeUtility.ALL_ASCII;	}	if (ascii > non_ascii) // mostly ascii	    return MimeUtility.MOSTLY_ASCII;	return MimeUtility.MOSTLY_NONASCII;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本到不卡免费一区二区| 亚洲丝袜精品丝袜在线| 国产亚洲精品久| 亚洲欧洲日产国产综合网| 亚洲午夜久久久久久久久电影网| 视频精品一区二区| 国产精品中文字幕欧美| 色悠久久久久综合欧美99| 6080午夜不卡| 国产精品入口麻豆九色| 婷婷国产v国产偷v亚洲高清| 精品一区二区三区久久| 成人免费三级在线| 91麻豆国产精品久久| 在线观看区一区二| wwwwxxxxx欧美| 亚洲美女少妇撒尿| 久久精品国产在热久久| 成人毛片视频在线观看| 欧美日韩日日摸| 久久欧美中文字幕| 亚洲成av人片一区二区| 国产白丝网站精品污在线入口| 色婷婷av一区二区三区gif| 欧美电视剧免费全集观看| 国产精品传媒视频| 日韩电影在线免费看| 欧美日韩aaaaa| 亚洲一区视频在线| 99精品久久久久久| 欧美在线一区二区| 91精品视频网| 亚洲人成小说网站色在线 | 91麻豆精品国产自产在线| 国产大陆精品国产| 欧美麻豆精品久久久久久| 欧美国产日本韩| 蜜桃免费网站一区二区三区| 日本久久一区二区三区| 久久嫩草精品久久久精品一| 亚洲成a人v欧美综合天堂下载| 99精品热视频| 久久精品免费在线观看| 青草国产精品久久久久久| 在线免费不卡电影| 国产精品理伦片| 国产乱一区二区| 日韩欧美一卡二卡| 亚洲成av人片www| 欧美在线观看视频一区二区| 欧美国产日韩在线观看| 国产精品一级黄| 欧美mv日韩mv国产网站| 日韩激情中文字幕| 欧美日韩三级一区二区| 亚洲综合一区二区精品导航| 91视频91自| 国产精品国产成人国产三级| 国产成人精品免费一区二区| 久久综合九色综合欧美98| 精品在线播放免费| 精品日韩一区二区| 久久99精品国产.久久久久| 91精品一区二区三区久久久久久| 亚洲一区二区三区四区中文字幕| 色哟哟一区二区在线观看| 国产精品久久久久久久久免费樱桃 | 免费黄网站欧美| 欧美一区二区三区免费大片 | 欧美精品xxxxbbbb| 午夜一区二区三区视频| 欧美性xxxxxxxx| 亚洲观看高清完整版在线观看| 在线欧美小视频| 亚洲午夜久久久久中文字幕久| 欧美系列亚洲系列| 性做久久久久久久久| 欧美日韩一区二区电影| 亚洲成人7777| 日韩一级大片在线观看| 老汉av免费一区二区三区| 精品国产精品网麻豆系列| 国产一区二区三区免费播放| 国产亚洲精品精华液| 成人aaaa免费全部观看| 亚洲区小说区图片区qvod| 欧美午夜精品久久久久久超碰 | 欧美精品久久久久久久多人混战| 亚洲国产精品久久久久婷婷884| 欧美日韩国产不卡| 美女mm1313爽爽久久久蜜臀| 国产亚洲成年网址在线观看| 成人做爰69片免费看网站| 亚洲美女精品一区| 欧美女孩性生活视频| 久久精品国产精品亚洲精品 | 成人爽a毛片一区二区免费| 国产精品成人免费在线| 91国产成人在线| 美国十次了思思久久精品导航| 久久影院午夜论| 色婷婷综合久久久久中文| 亚洲va韩国va欧美va精品| 欧美sm美女调教| 白白色 亚洲乱淫| 亚洲一区二区三区影院| 日韩欧美国产1| 成人av在线一区二区| 亚洲综合免费观看高清在线观看| 在线成人免费视频| 国产在线不卡视频| 一区二区三区中文免费| 91精品国产丝袜白色高跟鞋| 国产.精品.日韩.另类.中文.在线.播放| 亚洲丝袜另类动漫二区| 91精品国产美女浴室洗澡无遮挡| 国产夫妻精品视频| 亚洲国产另类av| 国产欧美一区二区精品性色超碰| 色综合久久中文综合久久牛| 久久国产视频网| 亚洲丝袜自拍清纯另类| 欧美成人video| 色久优优欧美色久优优| 紧缚捆绑精品一区二区| 亚洲制服丝袜一区| 国产视频一区在线观看| 欧美日韩精品一区二区| 国产精品一线二线三线| 亚洲高清不卡在线观看| 久久久久久久久久久电影| 欧美视频在线观看一区二区| 国产福利一区二区三区视频在线| 午夜视频在线观看一区| 欧美—级在线免费片| 91精品国产一区二区三区| 99久久久无码国产精品| 国内精品自线一区二区三区视频| 亚洲综合小说图片| 国产精品少妇自拍| 精品久久久影院| 欧美日韩小视频| 99久久综合狠狠综合久久| 久久电影网站中文字幕| 亚洲国产人成综合网站| 国产精品久久精品日日| 2欧美一区二区三区在线观看视频| 欧美羞羞免费网站| 99视频精品在线| 国产老女人精品毛片久久| 婷婷一区二区三区| 亚洲欧美激情一区二区| 国产片一区二区| 欧美成人a视频| 欧美一区二区三区在| 在线观看日韩精品| 91视频91自| jiyouzz国产精品久久| 国产精品资源站在线| 精品一区二区三区免费视频| 日韩激情在线观看| 五月婷婷激情综合网| 成a人片亚洲日本久久| 国产精品99久久久| 狠狠色2019综合网| 六月丁香综合在线视频| 日韩中文字幕麻豆| 肉丝袜脚交视频一区二区| 亚洲一区在线观看视频| 一区二区国产视频| 亚洲女同女同女同女同女同69| 欧美国产日本视频| 中文字幕欧美区| 中文字幕国产精品一区二区| 欧美国产激情二区三区| 欧美国产精品专区| 国产精品久久毛片a| 国产精品久久一卡二卡| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 美女精品一区二区| 麻豆国产精品777777在线| 蜜桃精品视频在线| 另类小说色综合网站| 紧缚奴在线一区二区三区| 激情文学综合网| 国产高清不卡一区二区| 国产不卡在线一区| www.成人在线| 色综合天天综合网天天狠天天| 色综合久久久网| 精品视频在线免费| 91精品国产全国免费观看| 日韩视频在线一区二区| 欧美变态tickling挠脚心| 精品成人佐山爱一区二区| 久久精品这里都是精品| 国产精品久久久久久妇女6080| 中文字幕综合网| 亚洲一二三四在线| 麻豆精品一区二区综合av|