Java tutorial
//package com.java2s; /* * Copyright (C) 2014 Ingenic Semiconductor * * ZhangYanMing <yanming.zhang@ingenic.com, jamincheung@126.com> * * Elf/IDWS Project * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. * */ public class Main { private static float readFloat(byte[] bytes) { int bits = 0; bits = (int) (((bytes[0] << 24) & 0xff000000) | ((bytes[1] << 16) & 0x00ff0000) | ((bytes[2] << 8) & 0x0000ff00) | ((bytes[3] << 0) & 0x000000ff)); return Float.intBitsToFloat(bits); } }