Here you can find the source of toByte(byte[] data)
public static byte toByte(byte[] data)
//package com.java2s; //License from project: Open Source License public class Main { public static byte toByte(byte[] data) { return (data == null || data.length == 0) ? 0x0 : data[0]; }/*from w w w .ja v a 2s . c om*/ }