public static float convertFloatFromBytes(byte[] byteArray) { return convertFloatFromBytes(byteArray, 0); } public static float convertFloatFromBytes(byte[] byteArray, int offset) {
protected float readFloat(byte[] content) throws IOException { float value = ByteUtils.convertFloatFromBytes(content, index); index += 4; return value; }
/** * Read in a float from an InputStream * * @param inputStream * The InputStream used to read the float * @return A float, which is the next 4 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static float readFloat(InputStream inputStream) throws IOException { byte[] byteArray = new byte[4]; // Read in the next 4 bytes inputStream.read(byteArray); float number = convertFloatFromBytes(byteArray); return number; }
protected float readFloat(byte[] content) throws IOException { float value = ByteUtils.convertFloatFromBytes(content, index); index += 4; return value; }
protected float readFloat(byte[] content) throws IOException { float value = ByteUtils.convertFloatFromBytes(content, index); index += 4; return value; }
public static float convertFloatFromBytes(byte[] byteArray) { return convertFloatFromBytes(byteArray, 0); } public static float convertFloatFromBytes(byte[] byteArray, int offset) {
public static float convertFloatFromBytes(byte[] byteArray) { return convertFloatFromBytes(byteArray, 0); } public static float convertFloatFromBytes(byte[] byteArray, int offset) {
/** * Read in a float from an InputStream * * @param inputStream * The InputStream used to read the float * @return A float, which is the next 4 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static float readFloat(InputStream inputStream) throws IOException { byte[] byteArray = new byte[4]; // Read in the next 4 bytes inputStream.read(byteArray); float number = convertFloatFromBytes(byteArray); return number; }
/** * Read in a float from an InputStream * * @param inputStream * The InputStream used to read the float * @return A float, which is the next 4 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static float readFloat(InputStream inputStream) throws IOException { byte[] byteArray = new byte[4]; // Read in the next 4 bytes inputStream.read(byteArray); float number = convertFloatFromBytes(byteArray); return number; }