Java Byte Create toByte(Object value)

Here you can find the source of toByte(Object value)

Description

to Byte

License

Open Source License

Declaration

public static long toByte(Object value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static long toByte(Object value) {
        return (value == null || "null".equals(value.toString())) ? 0 : Byte.parseByte(value.toString().trim());
    }//  w w  w  .  j a v a  2s .  c o  m

    public static String toString(Object value) {
        return value == null || "null".equals(value.toString()) ? "" : value.toString();
    }
}

Related

  1. toByte(Object ob, Byte defaultByte)
  2. toByte(Object obj)
  3. toByte(Object obj)
  4. toByte(Object obj)
  5. toByte(Object obj)
  6. toByte(Object value)
  7. toByte(Object value)
  8. toByte(short unsignedByte)
  9. toByte(short value, boolean first)