public class FloatWriter extends BinaryWriter
DEFAULT_CHUNK_SIZE, HOST, LSB, MSB
info, isCanceled, variables, writeProgress, writeVariableName, writeVariables
Constructor and Description |
---|
FloatWriter(EarthDataInfo info,
java.lang.String file)
Creates a new binary file from the specified earth data info
and file name.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
convertValue(java.lang.Number value)
Converts a data value to a byte array.
|
java.lang.Number |
getDefaultMissing()
Gets the default missing value.
|
double |
getTypeMax()
Gets the type maximum as a double.
|
double |
getTypeMin()
Gets the type minimum as a double.
|
double |
getTypeRange()
Throws an error because this method should never be called for
this class.
|
void |
setRange(double min,
double max)
Sets the scaling range.
|
void |
setScaling(double[] scaling)
Sets the scaling factor and offset.
|
byteSwap, close, flush, getBytes, getBytes, setHeader, setMissing, setOrder, writeHeader, writeVariable
addVariable, cancel, finalize, getDestination, getProgress, getProgressLength, getProgressVariable
public FloatWriter(EarthDataInfo info, java.lang.String file) throws java.io.IOException
info
- the earth data info object.file
- the new binary file name.java.io.IOException
- if an error occurred opening the file.BinaryWriter.BinaryWriter(noaa.coastwatch.util.EarthDataInfo, java.lang.String)
public void setRange(double min, double max)
setRange
in class BinaryWriter
min
- the minimum data value.max
- the maximum data value.public void setScaling(double[] scaling)
setScaling
in class BinaryWriter
scaling
- the scaling as [factor, offset]. If null, [1,0]
is used.public byte[] convertValue(java.lang.Number value)
BinaryWriter
getTypeMin()
to getTypeMax()
.convertValue
in class BinaryWriter
value
- the value for conversion.public double getTypeMin()
BinaryWriter
getTypeMin
in class BinaryWriter
public double getTypeMax()
BinaryWriter
getTypeMax
in class BinaryWriter
public double getTypeRange()
getTypeRange
in class BinaryWriter
public java.lang.Number getDefaultMissing()
BinaryWriter
getDefaultMissing
in class BinaryWriter