edu.sc.seis.seisFile.mseed
Class Blockette

java.lang.Object
  extended by edu.sc.seis.seisFile.mseed.Blockette
Direct Known Subclasses:
BlocketteUnknown, DataBlockette

public abstract class Blockette
extends java.lang.Object

Superclass of all seed blockettes. The actual blockettes do not store either their blockette type or their length in the case of ascii blockettes or next blockettes offset in the case of data blockettes as these are either already known (ie type) or may change after reading due to data changes. Instead each of these values are calculated based on the data.


Constructor Summary
Blockette()
           
 
Method Summary
abstract  java.lang.String getName()
           
abstract  int getSize()
           
abstract  int getType()
           
static Blockette parseBlockette(int type, byte[] bytes, boolean swapBytes)
           
abstract  byte[] toBytes()
           
 java.lang.String toString()
           
abstract  void writeASCII(java.io.Writer out)
          Method writeASCII
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Blockette

public Blockette()
Method Detail

writeASCII

public abstract void writeASCII(java.io.Writer out)
                         throws java.io.IOException
Method writeASCII

Parameters:
out - a Writer
Throws:
java.io.IOException

parseBlockette

public static Blockette parseBlockette(int type,
                                       byte[] bytes,
                                       boolean swapBytes)
                                throws java.io.IOException,
                                       SeedFormatException
Throws:
java.io.IOException
SeedFormatException

getType

public abstract int getType()

getName

public abstract java.lang.String getName()

getSize

public abstract int getSize()

toBytes

public abstract byte[] toBytes()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object