edu.sc.seis.seisFile.mseed
Class ControlHeader

java.lang.Object
  extended by edu.sc.seis.seisFile.mseed.ControlHeader
Direct Known Subclasses:
DataHeader

public class ControlHeader
extends java.lang.Object


Field Summary
protected  boolean continuationCode
           
protected  int sequenceNum
           
protected  byte typeCode
           
 
Constructor Summary
ControlHeader(int sequenceNum, byte typeCode, boolean continuationCode)
           
ControlHeader(int sequenceNum, char typeCode, boolean continuationCode)
           
 
Method Summary
 int getSequenceNum()
           
 short getSize()
           
 char getTypeCode()
           
 boolean isContinuation()
           
static void main(java.lang.String[] args)
           
static ControlHeader read(java.io.DataInput in)
           
static void tester(java.lang.String fileName)
           
 java.lang.String toString()
           
protected  void write(java.io.DataOutput dos)
          This method writes Control Header into the output stream While writing, it will conform to the format of MiniSeed
 void writeASCII(java.io.PrintWriter out)
          Writes an ASCII version of the record header.
 void writeASCII(java.io.PrintWriter out, java.lang.String indent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sequenceNum

protected int sequenceNum

typeCode

protected byte typeCode

continuationCode

protected boolean continuationCode
Constructor Detail

ControlHeader

public ControlHeader(int sequenceNum,
                     byte typeCode,
                     boolean continuationCode)

ControlHeader

public ControlHeader(int sequenceNum,
                     char typeCode,
                     boolean continuationCode)
Method Detail

read

public static ControlHeader read(java.io.DataInput in)
                          throws java.io.IOException,
                                 SeedFormatException
Throws:
java.io.IOException
SeedFormatException

write

protected void write(java.io.DataOutput dos)
              throws java.io.IOException
This method writes Control Header into the output stream While writing, it will conform to the format of MiniSeed

Throws:
java.io.IOException

writeASCII

public void writeASCII(java.io.PrintWriter out)
                throws java.io.IOException
Writes an ASCII version of the record header. This is not meant to be a definitive ascii representation, merely to give something to print for debugging purposes. Ideally each field of the header should be printed in the order is appears in the header in a visually appealing way.

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

writeASCII

public void writeASCII(java.io.PrintWriter out,
                       java.lang.String indent)
                throws java.io.IOException
Throws:
java.io.IOException

getSize

public short getSize()

getSequenceNum

public int getSequenceNum()

getTypeCode

public char getTypeCode()

isContinuation

public boolean isContinuation()

toString

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

tester

public static void tester(java.lang.String fileName)

main

public static void main(java.lang.String[] args)