Package edu.iris.dmc.seedcodec
Class DecompressedData
java.lang.Object
edu.iris.dmc.seedcodec.DecompressedData
- All Implemented Interfaces:
B1000Types
DecompressedData.java
Created: Thu Nov 21 13:03:44 2002
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double[]
holds a temp double array of the data elements.protected float[]
holds a temp float array of the data elements.protected int[]
holds a temp int array of the data elements.protected short[]
holds a temp short array of the data elements. -
Constructor Summary
ConstructorsConstructorDescriptionDecompressedData
(double[] data) DecompressedData
(float[] data) DecompressedData
(int[] data) DecompressedData
(short[] data) -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Converts the data to a double array if possible without loss.float[]
Converts the data to a float array if possible without loss.int[]
getAsInt()
Converts the data to an int array if possible without loss.short[]
Converts the data to a short array if possible without loss.int
getType()
returns an integer that represent the java primitive that the data decompresses to.returns a string version of the type for printing in error messages.
-
Field Details
-
iData
protected int[] iDataholds a temp int array of the data elements. -
sData
protected short[] sDataholds a temp short array of the data elements. -
fData
protected float[] fDataholds a temp float array of the data elements. -
dData
protected double[] dDataholds a temp double array of the data elements.
-
-
Constructor Details
-
DecompressedData
public DecompressedData(int[] data) -
DecompressedData
public DecompressedData(short[] data) -
DecompressedData
public DecompressedData(float[] data) -
DecompressedData
public DecompressedData(double[] data)
-
-
Method Details
-
getType
public int getType()returns an integer that represent the java primitive that the data decompresses to. This is to allow for SEED types 4 and 5, float and double, which cannot be represented as int without a loss of precision.see B1000Types.java for the values.
see http://www.fdsn.org for the seed manual, blockette 1000, that defines these values.
-
getTypeString
returns a string version of the type for printing in error messages. -
getAsInt
public int[] getAsInt()Converts the data to an int array if possible without loss. Otherwise returns null. -
getAsShort
public short[] getAsShort()Converts the data to a short array if possible without loss. Otherwise returns null. -
getAsFloat
public float[] getAsFloat()Converts the data to a float array if possible without loss. Otherwise returns null. -
getAsDouble
public double[] getAsDouble()Converts the data to a double array if possible without loss. Otherwise returns null.
-