Here you can find the source of toBoolean(byte t_logical)
Parameter | Description |
---|---|
t_logical | The byte value as stored in the file |
public static Object toBoolean(byte t_logical)
//package com.java2s; /*//w w w . j ava2 s . co m (C) Copyright 2015-2016 Alberto Fern?ndez <infjaf@gmail.com> (C) Copyright 2014 Jan Schl??in (C) Copyright 2003-2004 Anil Kumar K <anil@linuxense.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>. */ public class Main { /** * Convert LOGICAL (L) byte to boolean value * @param t_logical The byte value as stored in the file * @return The boolean value */ public static Object toBoolean(byte t_logical) { if (t_logical == 'Y' || t_logical == 'y' || t_logical == 'T' || t_logical == 't') { return Boolean.TRUE; } else if (t_logical == 'N' || t_logical == 'n' || t_logical == 'F' || t_logical == 'f') { return Boolean.FALSE; } return null; } }