⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 byteconverter.java

📁 Jodd是一个开源的公用Java基础类库
💻 JAVA
字号:
package jodd.bean.converters;/** * Converts given object to Byte. Given object (if not already instance of * Byte) is first converted to String and then analyzed. */public class ByteConverter implements jodd.bean.Converter {	public Object convert(Object value) throws IllegalArgumentException {				if (value == null) {			return (Byte) null;		}		if (value instanceof Byte) {			return (value);		} else if (value instanceof Number) {			return new Byte(((Number)value).byteValue());		}		try {			return (new Byte(value.toString()));		} catch (Exception e) {			throw new IllegalArgumentException("Byte conversion for " + value +  " failed.");		}	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -