public class FloatArrayInputStream
extends java.io.InputStream
An input stream that reads from a float array. An internal
counter keeps track of the current position in the float
array and of the next byte to read. Float values are
automatically converted to single bytes using
Float.floatToRawIntBits(float)
(default) or
Float.floatToIntBits(Float)
.
DataInputStream
to read from
FloatArrayInputStream
and to restore the original
values.Constructor and Description |
---|
FloatArrayInputStream(float[] arr)
Creates a new input stream
|
FloatArrayInputStream(float[] arr,
boolean rawBits)
Creates a new input stream
|
Modifier and Type | Method and Description |
---|---|
int |
read() |
public FloatArrayInputStream(float[] arr)
arr
- the array to wrappublic FloatArrayInputStream(float[] arr, boolean rawBits)
arr
- the array to wraprawBits
- true if Float.floatToRawIntBits(float)
shall be used
to convert float values to bytes or false if Float.floatToIntBits(float)
shall be used