Example usage for java.lang Byte decode

List of usage examples for java.lang Byte decode

Introduction

In this page you can find the example usage for java.lang Byte decode.

Prototype

public static Byte decode(String nm) throws NumberFormatException 

Source Link

Document

Decodes a String into a Byte .

Usage

From source file:routines.system.BigDataParserUtils.java

public static Byte parseTo_Byte(String s) {
    if (isBlank(s)) {
        return null;
    }//  ww w .j  a v a 2  s.  c om
    return Byte.decode(s).byteValue();
}

From source file:routines.system.BigDataParserUtils.java

public static Byte parseTo_Byte(String s, boolean isDecode) {
    if (isBlank(s)) {
        return null;
    }// w w  w. ja  v a 2s. c  o m
    if (isDecode) {
        return Byte.decode(s).byteValue();
    } else {
        return Byte.parseByte(s);
    }
}