edu.sc.seis.seisFile.mseed
Class DataRecord
java.lang.Object
edu.sc.seis.seisFile.mseed.SeedRecord
edu.sc.seis.seisFile.mseed.DataRecord
- All Implemented Interfaces:
- java.io.Serializable
public class DataRecord
- extends SeedRecord
- implements java.io.Serializable
- See Also:
- Serialized Form
Field Summary |
protected byte[] |
data
|
Methods inherited from class edu.sc.seis.seisFile.mseed.SeedRecord |
getBlocketteFactory, getBlockettes, getBlockettes, getControlHeader, getFirstPartialBlockette, getLastPartialBlockette, getNumBlockettes, getRecordSize, getUniqueBlockette, read, read, read, setBlocketteFactory, writeASCII, writeASCII |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
data
protected byte[] data
DataRecord
public DataRecord(DataHeader header)
DataRecord
public DataRecord(DataRecord record)
addBlockette
public void addBlockette(Blockette b)
throws SeedFormatException
- Overrides:
addBlockette
in class SeedRecord
- Throws:
SeedFormatException
recheckDataOffset
protected void recheckDataOffset()
throws SeedFormatException
- Throws:
SeedFormatException
getData
public byte[] getData()
- returns the data from this data header unparsed, as a byte array in
the format from blockette 1000. The return type is byte[], so the caller
must decode the data based on its format.
decompress
public edu.iris.dmc.seedcodec.DecompressedData decompress()
throws SeedFormatException,
edu.iris.dmc.seedcodec.UnsupportedCompressionType,
edu.iris.dmc.seedcodec.CodecException
- Decompress the data in this record according to the compression type in the header.
- Returns:
-
- Throws:
SeedFormatException
- if no blockette 1000 present
edu.iris.dmc.seedcodec.UnsupportedCompressionType
edu.iris.dmc.seedcodec.CodecException
setData
public void setData(byte[] data)
throws SeedFormatException
- Throws:
SeedFormatException
getDataSize
public int getDataSize()
getHeader
public DataHeader getHeader()
toByteArray
public byte[] toByteArray()
write
public void write(java.io.DataOutputStream dos)
throws java.io.IOException
- Throws:
java.io.IOException
writeData
public void writeData(java.io.PrintWriter out)
readDataRecord
public static SeedRecord readDataRecord(java.io.DataInput inStream,
DataHeader header,
int defaultRecordSize)
throws java.io.IOException,
SeedFormatException
- Throws:
java.io.IOException
SeedFormatException
setRecordSize
public void setRecordSize(int recordSize)
throws SeedFormatException
- Throws:
SeedFormatException
toString
public java.lang.String toString()
- Overrides:
toString
in class SeedRecord