/** * Delegates to {@link EndianUtils#readSwappedFloat(InputStream)}. * @return the read long * @throws IOException if an I/O error occurs * @throws EOFException if an end of file is reached unexpectedly */ @Override public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); }
/** @see java.io.DataInput#readFloat() */ public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); }
@Test public void testReadSwappedFloat() throws IOException { final byte[] bytes = new byte[] { 0x04, 0x03, 0x02, 0x01 }; final float f1 = Float.intBitsToFloat( 0x01020304 ); final float f2 = EndianUtils.readSwappedFloat( bytes, 0 ); assertEquals( f1, f2, 0.0 ); final ByteArrayInputStream input = new ByteArrayInputStream(bytes); assertEquals( f1, EndianUtils.readSwappedFloat( input ), 0.0 ); }
/** * Delegates to {@link EndianUtils#readSwappedFloat(InputStream)}. * @return the read long * @throws IOException if an I/O error occurs * @throws EOFException if an end of file is reached unexpectedly */ public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); }
/** * Delegates to {@link EndianUtils#readSwappedFloat(InputStream)}. * @return the read long * @throws IOException if an I/O error occurs * @throws EOFException if an end of file is reached unexpectedly */ public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); }
/** * Delegates to {@link EndianUtils#readSwappedFloat(InputStream)}. * @return the read long * @throws IOException if an I/O error occurs * @throws EOFException if an end of file is reached unexpectedly */ public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); }
/** * Delegates to {@link EndianUtils#readSwappedFloat(InputStream)}. * @return the read long * @throws IOException if an I/O error occurs * @throws EOFException if an end of file is reached unexpectedly */ public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); }
/** * Delegates to {@link EndianUtils#readSwappedFloat(InputStream)}. * @return the read long * @throws IOException if an I/O error occurs * @throws EOFException if an end of file is reached unexpectedly */ public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); }
/** * Delegates to {@link EndianUtils#readSwappedFloat(InputStream)}. * @return the read long * @throws IOException if an I/O error occurs * @throws EOFException if an end of file is reached unexpectedly */ @Override public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); }