/** * Write a float from the output stream, byte-swapping as necessary * * @param dos * the outputstream * @param isBigEndian * whether or not the data being read in is in big endian format. * @param val * the floating point value to write * * @throws IOException * on error */ public static void writeFloat(DataOutputStream dos, boolean isBigEndian, float val) throws IOException { if (!isBigEndian) { writeLittleEndianFloat(dos, val); } else { dos.writeFloat(val); } }
/** * Write a float from the output stream, byte-swapping as necessary * * @param dos * the outputstream * @param isBigEndian * whether or not the data being read in is in big endian format. * @param val * the floating point value to write * * @throws IOException * on error */ public static void writeFloat(DataOutputStream dos, boolean isBigEndian, float val) throws IOException { if (!isBigEndian) { writeLittleEndianFloat(dos, val); } else { dos.writeFloat(val); } }