List of utility methods to do Byte Create
byte | toByte(long l) to Byte if (l < Byte.MIN_VALUE || l > Byte.MAX_VALUE) throw new ArithmeticException("Value (" + l + ") cannot fit into byte"); return (byte) l; |
void | toByte(long l, byte[] b, int off, boolean bigEndian) to Byte if (bigEndian) { b[off + 7] = (byte) (l & 0xff); b[off + 6] = (byte) ((l >> 8) & 0xff); b[off + 5] = (byte) ((l >> 16) & 0xff); b[off + 4] = (byte) ((l >> 24) & 0xff); b[off + 3] = (byte) ((l >> 32) & 0xff); b[off + 2] = (byte) ((l >> 40) & 0xff); b[off + 1] = (byte) ((l >> 48) & 0xff); ... |
Byte | toByte(Number num) Convert the given number into a Byte instance. return (num == null) ? null : Byte.valueOf(num.byteValue());
|
Byte | toByte(Object o) to Byte if (o == null) return null; if (o.getClass() == Byte.class) return (Byte) o; if (o.getClass() == Boolean.class) return booleanToByte((Boolean) o); if (o.getClass() == Character.class) return charToByte((Character) o); ... |
Byte | toByte(Object ob, Byte defaultByte) to Byte if (ob == null) { return defaultByte; if (ob instanceof Integer) { return ((Integer) ob).byteValue(); } else if (ob instanceof Float) { return ((Float) ob).byteValue(); } else if (ob instanceof Double) { ... |
byte | toByte(Object obj) to Byte return toByte(obj, (byte) 0); |
Byte | toByte(Object obj) to Byte return obj == null ? null : obj instanceof Byte ? (Byte) obj : newByte(obj); |
byte | toByte(Object obj) Get the byte value of this object, only if the object is an instance of Number return (obj instanceof Number) ? ((Number) obj).byteValue() : 0; |
byte | toByte(Object obj) Convert object returned from server to byte. return (byte) toLong(obj); |
long | toByte(Object value) to Byte return (value == null || "null".equals(value.toString())) ? 0 : Byte.parseByte(value.toString().trim()); |