Package com.github.jinahya.bit.io
Class FloatReader
java.lang.Object
com.github.jinahya.bit.io.FloatReader
A reader for reading
float
values.- Author:
- Jin Kwon <onacit_at_gmail.com>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A reader for reading eitherFloat.NEGATIVE_INFINITY
orFloat.POSITIVE_INFINITY
in a compresses manner.static class
A reader for readingNaN
values in a compressed manner.static class
A reader for readingsubnormal
values in a compressed manner.static final class
A reader for reading either+.0f
or-.0f
in a compressed manner. -
Constructor Summary
ConstructorsConstructorDescriptionFloatReader
(int exponentSize, int significandSize) Creates a new instance with specified sizes of the exponent part and the significand part. -
Method Summary
-
Constructor Details
-
FloatReader
public FloatReader(int exponentSize, int significandSize) Creates a new instance with specified sizes of the exponent part and the significand part.- Parameters:
exponentSize
- the number of bits for the exponent part; between 1 and 8, both inclusive.significandSize
- the number of bits for the significand part; between 1 and 23, both inclusive.
-
-
Method Details
-
read
Description copied from interface:BitReader
Reads a value from specified input.- Specified by:
read
in interfaceBitReader<Float>
- Parameters:
input
- the input from which a value is read.- Returns:
- a value read.
- Throws:
IOException
- if an I/O error occurs.- See Also:
-