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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? hexadecimal.java

?? aglet的部分源碼
?? JAVA
字號:
package com.ibm.awb.misc;import java.util.StringTokenizer;/* * @(#)Hexadecimal.java *  * IBM Confidential-Restricted *  * OCO Source Materials *  * 03L7246 (c) Copyright IBM Corp. 1996, 1998 *  * The source code for this program is not published or otherwise * divested of its trade secrets, irrespective of what has been * deposited with the U.S. Copyright Office. *//** * The <tt>Hexadecimal</tt> class *  * @version     1.00    $Date: 2001/07/28 06:33:13 $ * @author      ONO Kouichi */public class Hexadecimal {	private String _hex = null;	private int _num = 0;	/**	 * Constructs a hexadecimal number with a byte.	 * @param num a byte	 */	public Hexadecimal(byte num) {		_hex = valueOf(num);		_num = (int)num;	}	/**	 * Constructs a hexadecimal number with a integer.	 * @param num a integer	 */	public Hexadecimal(int num) {		_hex = valueOf(num);		_num = (int)num;	}	/**	 * Constructs a hexadecimal number with a short integer.	 * @param num a short integer	 */	public Hexadecimal(short num) {		_hex = valueOf(num);		_num = (int)num;	}	/**	 * Gets a byte value.	 * @return a byte of the hexadecimal number	 */	public byte byteValue() throws NumberFormatException {		if (_num > 255 || _num < 0) {			throw new NumberFormatException("Out of range for byte.");		} 		return (byte)_num;	}	// -   /**	// -    * Constructs a hexadecimal number with a long integer.	// -    * @param num a long integer	// -    */	// -   public Hexadecimal(long num) {	// -     _hex = valueOf(num);	// -     _num = (int)num;	// -   }	/**	 * Gets a string in hexadecimal notation.	 * @return string in hexadecimal notation of the number	 */	public String hexadecimalValue() {		return _hex;	}	/**	 * Gets a integer value.	 * @return a integer of the hexadecimal number	 */	public int intValue() throws NumberFormatException {		if (_num > 4294967295L || _num < 0) {			throw new NumberFormatException("Out of range for integer.");		} 		return (int)_num;	}	public static void main(String[] args) {		StringBuffer buff = new StringBuffer();		for (int i = 0; i < args.length; i++) {			buff.append(args[i]);		} 		try {			byte[] seq = parseSeq(buff.toString());			for (int i = 0; i < seq.length; i++) {				System.out.print(seq[i] + " ");			} 			System.out.println("");		} catch (NumberFormatException excpt) {			System.err.println(excpt.toString());		} 	}	// -   /**	// -    * Converts a string in hexadecimal notation into long integer.	// -    * @param hex string in hexadecimal notation	// -    * @return a long integer (8bytes)	// -    */	// -   public static long parseLong(String hex) throws NumberFormatException {	// -     if(hex==null) {	// -       throw new IllegalArgumentException("Null string in hexadecimal notation.");	// -     }	// -     if(hex.equals("")) {	// -       return 0;	// -     }	// -	// -     return Integer.decode("0x"+hex).longValue();	// -   }	/**	 * Converts a pair of characters as an octet in hexadecimal notation into integer.	 * @param c0 higher character of given octet in hexadecimal notation	 * @param c1 lower character of given octet in hexadecimal notation	 * @return a integer value of the octet	 */	public static int octetValue(char c0, 								 char c1) throws NumberFormatException {		int n0 = Character.digit(c0, 16);		if (n0 < 0) {			throw new NumberFormatException(c0 											+ " is not a hexadecimal character.");		} 		int n1 = Character.digit(c1, 16);		if (n1 < 0) {			throw new NumberFormatException(c1 											+ " is not a hexadecimal character.");		} 		return (n0 << 4) + n1;	}	/**	 * Converts a string in hexadecimal notation into byte.	 * @param hex string in hexadecimal notation	 * @return a byte (1bytes)	 */	public static byte parseByte(String hex) throws NumberFormatException {		if (hex == null) {			throw new IllegalArgumentException("Null string in hexadecimal notation.");		} 		if (hex.equals("")) {			return 0;		} 		Integer num = Integer.decode("0x" + hex);		int n = num.intValue();		if (n > 255 || n < 0) {			throw new NumberFormatException("Out of range for byte.");		} 		return num.byteValue();	}	/**	 * Converts a string in hexadecimal notation into integer.	 * @param hex string in hexadecimal notation	 * @return a integer (4bytes)	 */	public static int parseInt(String hex) throws NumberFormatException {		if (hex == null) {			throw new IllegalArgumentException("Null string in hexadecimal notation.");		} 		if (hex.equals("")) {			return 0;		} 		Integer num = Integer.decode("0x" + hex);		long n = num.longValue();		if (n > 4294967295L || n < 0L) {			throw new NumberFormatException("Out of range for integer.");		} 		return num.intValue();	}	/**	 * Converts a string in hexadecimal notation into byte sequence.	 * @param str a string in hexadecimal notation	 * @return byte sequence	 */	public static byte[] parseSeq(String str) throws NumberFormatException {		if (str == null || str.equals("")) {			return null;		} 		int len = str.length();		if (len % 2 != 0) {			throw new NumberFormatException("Illegal length of string in hexadecimal notation.");		} 		int numOfOctets = len / 2;		byte[] seq = new byte[numOfOctets];		for (int i = 0; i < numOfOctets; i++) {			String hex = str.substring(i * 2, i * 2 + 2);			seq[i] = parseByte(hex);		} 		return seq;	}	/**	 * Converts a string in hexadecimal notation into byte sequence.	 * @param str a string in hexadecimal notation	 * @param delimiters a set of delimiters	 * @return byte sequence	 */	public static byte[] parseSeq(String str, String delimiters) 			throws NumberFormatException {		if (str == null || str.equals("")) {			return null;		} 		if (delimiters == null || delimiters.equals("")) {			return parseSeq(str);		} 		StringTokenizer tokenizer = new StringTokenizer(str, delimiters);		int numOfOctets = tokenizer.countTokens();		byte[] seq = new byte[numOfOctets];		int i = 0;		while (tokenizer.hasMoreTokens() && i < numOfOctets) {			seq[i] = Hexadecimal.parseByte(tokenizer.nextToken());			i++;		} 		return seq;	}	/**	 * Converts a string in hexadecimal notation into short integer.	 * @param hex string in hexadecimal notation	 * @return a short integer (2bytes)	 */	public static short parseShort(String hex) throws NumberFormatException {		if (hex == null) {			throw new IllegalArgumentException("Null string in hexadecimal notation.");		} 		if (hex.equals("")) {			return 0;		} 		Integer num = Integer.decode("0x" + hex);		int n = num.intValue();		if (n > 65535 || n < 0) {			throw new NumberFormatException("Out of range for short integer.");		} 		return num.shortValue();	}	/**	 * Gets a short integer value.	 * @return a short integer of the hexadecimal number	 */	public short shortValue() throws NumberFormatException {		if (_num > 65535 || _num < 0) {			throw new NumberFormatException("Out of range for short integer.");		} 		return (short)_num;	}	/**	 * Converts a byte sequence into its hexadecimal notation.	 * @param seq a byte sequence	 * @return hexadecimal notation of the byte sequence	 */	public static String valueOf(byte[] seq) {		if (seq == null) {			return null;		} 		StringBuffer buff = new StringBuffer();		for (int i = 0; i < seq.length; i++) {			buff.append(valueOf(seq[i], true));		} 		return buff.toString();	}	/**	 * Converts a byte sequence into its hexadecimal notation.	 * @param seq a byte sequence	 * @param separator separator between bytes	 * @return hexadecimal notation of the byte sequence	 */	public static String valueOf(byte[] seq, char separator) {		if (seq == null) {			return null;		} 		StringBuffer buff = new StringBuffer();		for (int i = 0; i < seq.length; i++) {			if (i > 0) {				buff.append(separator);			} 			buff.append(valueOf(seq[i], true));		} 		return buff.toString();	}	/**	 * Converts a byte into its hexadecimal notation.	 * @param num a byte (1bytes)	 * @return hexadecimal notation of the byte	 */	public static String valueOf(byte num) {		return valueOf(num, true);	}	/**	 * Converts a byte into its hexadecimal notation.	 * @param num a byte (1bytes)	 * @param padding fit the length to 2 by filling with '0' when padding is true	 * @return hexadecimal notation of the byte	 */	public static String valueOf(byte num, boolean padding) {		String hex = Integer.toHexString((int)num);		if (padding) {			hex = "00" + hex;			int len = hex.length();			hex = hex.substring(len - 2, len);		} 		return hex;	}	/**	 * Converts a integer into its hexadecimal notation.	 * @param num a integer (4bytes)	 * @return hexadecimal notation of the integer	 */	public static String valueOf(int num) {		return valueOf(num, true);	}	/**	 * Converts a integer into its hexadecimal notation.	 * @param num a integer (4bytes)	 * @param padding fit the length to 8 by filling with '0' when padding is true	 * @return hexadecimal notation of the integer	 */	public static String valueOf(int num, boolean padding) {		String hex = Integer.toHexString(num);		if (padding) {			hex = "00000000" + hex;			int len = hex.length();			hex = hex.substring(len - 8, len);		} 		return hex;	}	/**	 * Converts a long integer into its hexadecimal notation.	 * @param num a long integer (8bytes)	 * @return hexadecimal notation of the long integer	 */	public static String valueOf(long num) {		return valueOf(num, true);	}	/**	 * Converts a long integer into its hexadecimal notation.	 * @param num a long integer (8bytes)	 * @param padding fit the length to 16 by filling with '0' when padding is true	 * @return hexadecimal notation of the long integer	 */	public static String valueOf(long num, boolean padding) {		String hex = Long.toHexString(num);		if (padding) {			hex = "0000000000000000" + hex;			int len = hex.length();			hex = hex.substring(len - 16, len);		} 		return hex;	}	/**	 * Converts a short integer into its hexadecimal notation.	 * @param num a short integer (2bytes)	 * @return hexadecimal notation of the short integer	 */	public static String valueOf(short num) {		return valueOf(num, true);	}	/**	 * Converts a short integer into its hexadecimal notation.	 * @param num a short integer (2bytes)	 * @param padding fit the length to 8 by filling with '0' when padding is true	 * @return hexadecimal notation of the short integer	 */	public static String valueOf(short num, boolean padding) {		String hex = Integer.toHexString((int)num);		if (padding) {			hex = "0000" + hex;			int len = hex.length();			hex = hex.substring(len - 4, len);		} 		return hex;	}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成影院在线观看| 成人黄色777网| 成人免费福利片| 69av一区二区三区| 国产精品国产三级国产a| 精品亚洲欧美一区| 欧美日韩国产高清一区二区三区 | 亚洲免费成人av| 韩国女主播一区二区三区| 色老头久久综合| 国产精品情趣视频| 国产资源在线一区| 欧美成人一区二区| 天天影视涩香欲综合网| 色婷婷激情久久| ...av二区三区久久精品| 国产福利精品一区| 久久久蜜臀国产一区二区| 久久成人av少妇免费| 欧美精品第一页| 亚洲3atv精品一区二区三区| 欧美亚洲一区三区| 一区二区三区在线不卡| 91丝袜美腿高跟国产极品老师| 中文字幕欧美国产| 成人黄色av电影| 国产精品九色蝌蚪自拍| av在线播放成人| 国产精品国产精品国产专区不蜜 | 亚洲精品高清视频在线观看| 波多野结衣在线aⅴ中文字幕不卡| 久久嫩草精品久久久精品| 韩国三级在线一区| 久久精品欧美一区二区三区麻豆 | 欧美日韩一区视频| 亚洲精品五月天| 欧美色手机在线观看| 亚洲3atv精品一区二区三区| 91精品综合久久久久久| 麻豆精品视频在线观看| 欧美精品一区二区三区很污很色的| 狠狠色丁香久久婷婷综| 中文字幕二三区不卡| 色综合久久久久综合99| 日韩综合在线视频| 久久久高清一区二区三区| eeuss国产一区二区三区| 亚洲欧洲中文日韩久久av乱码| 色婷婷av一区二区三区软件| 亚洲r级在线视频| 亚洲精品一区二区三区四区高清| 国产成人一级电影| 一区二区三区在线播放| 日韩亚洲电影在线| 91在线精品秘密一区二区| 亚洲一区影音先锋| 欧美不卡一区二区| 色欲综合视频天天天| 日本在线播放一区二区三区| 国产日韩欧美a| 欧美丝袜自拍制服另类| 国产在线麻豆精品观看| 综合激情网...| 欧美白人最猛性xxxxx69交| www.亚洲激情.com| 蜜臀av性久久久久蜜臀av麻豆| 国产精品久久精品日日| 欧美一卡2卡三卡4卡5免费| 国产成人午夜视频| 亚洲成人av资源| 国产精品成人网| 日韩一级大片在线观看| 一本久久a久久精品亚洲| 久久se这里有精品| 亚洲最快最全在线视频| 欧美激情综合五月色丁香| 欧美视频完全免费看| 丁香婷婷综合五月| 九九视频精品免费| 午夜在线成人av| 亚洲精品少妇30p| 欧美经典一区二区| 日韩精品一区二| 欧美日韩大陆一区二区| 99精品国产99久久久久久白柏 | 亚洲综合成人在线| 亚洲国产高清不卡| 久久久久88色偷偷免费 | 欧美优质美女网站| eeuss影院一区二区三区| 国产在线麻豆精品观看| 天天操天天综合网| 亚洲成人激情综合网| 亚洲激情六月丁香| 亚洲美女精品一区| 国产精品三级久久久久三级| 欧美zozozo| 日韩视频免费观看高清完整版在线观看 | 欧美伦理电影网| 色视频欧美一区二区三区| www.欧美日韩国产在线| 国产盗摄视频一区二区三区| 麻豆精品一区二区| 九色|91porny| 国产一区二区伦理| 国产美女一区二区| 国产黄色91视频| 丁香网亚洲国际| 成人动漫在线一区| 99麻豆久久久国产精品免费| 99久久精品国产毛片| 99久久久精品免费观看国产蜜| 9l国产精品久久久久麻豆| 99国产精品99久久久久久| 91在线观看地址| 99精品黄色片免费大全| 色一情一乱一乱一91av| 日本精品免费观看高清观看| 日本韩国欧美在线| 538在线一区二区精品国产| 欧美无砖砖区免费| 欧美日韩夫妻久久| 精品捆绑美女sm三区| 久久网站热最新地址| 中文字幕欧美日本乱码一线二线| 一区免费观看视频| 亚洲一二三四久久| 免费在线欧美视频| 福利视频网站一区二区三区| 97久久人人超碰| 欧美男人的天堂一二区| 欧美成人精品福利| 国产欧美日韩在线视频| 亚洲美女免费视频| 麻豆国产精品官网| 国产成人av自拍| 91国偷自产一区二区开放时间 | 蜜臀av一级做a爰片久久| 国产乱码精品一区二区三区忘忧草| 国产成人综合视频| 色综合久久久久久久| 日韩一区二区三区在线视频| 日韩电影免费在线| 国产成人午夜精品影院观看视频 | 国产在线视频一区二区| 99久久久久免费精品国产| 欧美精品乱人伦久久久久久| 亚洲精品一区二区三区香蕉| 综合久久综合久久| 麻豆精品久久久| 91美女视频网站| 26uuu色噜噜精品一区二区| 亚洲欧美日韩成人高清在线一区| 日韩黄色在线观看| 91影院在线免费观看| 欧美一级爆毛片| 日韩码欧中文字| 国内久久精品视频| 欧美日韩高清在线| 亚洲图片激情小说| 国产精品一二三四| 欧美日韩精品一区二区| 中文字幕不卡在线观看| 日韩国产欧美在线播放| 色哟哟亚洲精品| 国产日韩精品一区二区浪潮av | 一卡二卡三卡日韩欧美| 国内国产精品久久| 欧美精品色一区二区三区| 国产精品久久久久久久久晋中| 日本女人一区二区三区| 欧美性大战久久久| 中文字幕视频一区| 精品在线免费观看| 在线观看91精品国产麻豆| 亚洲美女电影在线| 91在线视频播放地址| 国产日韩欧美高清在线| 麻豆视频一区二区| 欧美一级免费大片| 亚洲成人av资源| 在线精品观看国产| 一区二区在线看| 色综合久久中文综合久久97| 1024精品合集| 成+人+亚洲+综合天堂| 日本一二三不卡| 国产黄色成人av| 欧美国产日韩一二三区| 国产成a人亚洲精| 国产人成一区二区三区影院| 狠狠色丁香久久婷婷综合丁香| 日韩欧美电影一区| 久久精品72免费观看| 亚洲精品在线一区二区| 久久成人18免费观看| 久久久五月婷婷| 成人深夜福利app| 日韩一区中文字幕| 日本高清无吗v一区|