Here you can find the source of toByte(String value)
public static Byte toByte(String value)
//package com.java2s; //License from project: Open Source License public class Main { public static Byte toByte(String value) { if (null == value) { return null; }// w ww .j a v a2 s. c o m value = value.trim(); if ("null".equals(value)) { return null; } return Byte.parseByte(value); } public static Byte toByte(Object value) { if (null == value) { return null; } return toByte(String.valueOf(value)); } }