edu.iris.dmc.seedcodec
Class Codec

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

public class Codec
extends java.lang.Object
implements B1000Types

Codec.java Created: Thu Nov 21 13:01:20 2002

Version:
1.0.5
Author:
Philip Crotwell

Field Summary
 
Fields inherited from interface edu.iris.dmc.seedcodec.B1000Types
ASCII, CDSN, DOUBLE, DWWSSN, FLOAT, INT24, INTEGER, SHORT, SRO, STEIM1, STEIM2
 
Constructor Summary
Codec()
           
 
Method Summary
 DecompressedData decompress(int type, byte[] b, int numSamples, boolean swapBytes)
          Decompresses the data into the best java primitive type for the given compression and returns it.
 int getDecompressedType(int type)
          returns an integer that represent the java primitive that the data will decompresses to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Codec

public Codec()
Method Detail

decompress

public DecompressedData decompress(int type,
                                   byte[] b,
                                   int numSamples,
                                   boolean swapBytes)
                            throws CodecException,
                                   UnsupportedCompressionType
Decompresses the data into the best java primitive type for the given compression and returns it.

Throws:
CodecException
UnsupportedCompressionType

getDecompressedType

public int getDecompressedType(int type)
                        throws UnsupportedCompressionType
returns an integer that represent the java primitive that the data will 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.

Throws:
UnsupportedCompressionType