edu.iris.dmc.seedcodec
Class DecompressedData

java.lang.Object
  extended by edu.iris.dmc.seedcodec.DecompressedData
All Implemented Interfaces:
B1000Types

public class DecompressedData
extends java.lang.Object
implements B1000Types

DecompressedData.java Created: Thu Nov 21 13:03:44 2002


Field Summary
protected  double[] dData
          holds a temp double array of the data elements.
protected  float[] fData
          holds a temp float array of the data elements.
protected  int[] iData
          holds a temp int array of the data elements.
protected  short[] sData
          holds a temp short array of the data elements.
 
Fields inherited from interface edu.iris.dmc.seedcodec.B1000Types
ASCII, CDSN, DOUBLE, DWWSSN, FLOAT, INT24, INTEGER, SHORT, SRO, STEIM1, STEIM2
 
Constructor Summary
DecompressedData(double[] data)
           
DecompressedData(float[] data)
           
DecompressedData(int[] data)
           
DecompressedData(short[] data)
           
 
Method Summary
 double[] getAsDouble()
          Converts the data to a double array if possible without loss.
 float[] getAsFloat()
          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[] getAsShort()
          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.
 java.lang.String getTypeString()
          returns a string version of the type for printing in error messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iData

protected int[] iData
holds a temp int array of the data elements.


sData

protected short[] sData
holds a temp short array of the data elements.


fData

protected float[] fData
holds a temp float array of the data elements.


dData

protected double[] dData
holds a temp double array of the data elements.

Constructor Detail

DecompressedData

public DecompressedData(int[] data)

DecompressedData

public DecompressedData(short[] data)

DecompressedData

public DecompressedData(float[] data)

DecompressedData

public DecompressedData(double[] data)
Method Detail

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 Also:
for the values., for the seed manual, blockette 1000, that defines these values.

getTypeString

public java.lang.String 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.