Package edu.sc.seis.seisFile.mseed
Class SeedRecord
java.lang.Object
edu.sc.seis.seisFile.mseed.SeedRecord
- Direct Known Subclasses:
ControlRecord
,DataRecord
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static BlocketteFactory
static final String
protected ControlHeader
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
static BlocketteFactory
getBlockettes
(int type) if a seed blockette is continued in this record, a PartialBlockette will exist here.if a seed blockette is continued in the next record, a PartialBlockette will exist here.int
getNumBlockettes
(int type) int
getUniqueBlockette
(int type) static SeedRecord
read
(byte[] bytes) static SeedRecord
static SeedRecord
allows setting of a default record size, making reading of miniseed that lack a Blockette1000.static void
toString()
void
writeASCII
(PrintWriter out) void
writeASCII
(PrintWriter out, String indent)
-
Field Details
-
blocketteFactory
-
DEFAULT_INDENT
- See Also:
-
header
-
blockettes
-
RECORD_SIZE
protected int RECORD_SIZE
-
-
Constructor Details
-
SeedRecord
-
-
Method Details
-
setBlocketteFactory
-
getBlocketteFactory
-
read
- Throws:
IOException
SeedFormatException
-
read
- Throws:
IOException
SeedFormatException
-
read
public static SeedRecord read(DataInput inStream, int defaultRecordSize) throws IOException, SeedFormatException allows setting of a default record size, making reading of miniseed that lack a Blockette1000. Compression is still unknown, but at least the record can be read in and manipulated. A value of 0 for defaultRecordSize means there must be a blockette 1000 or a MissingBlockette1000 will be thrown. If an exception is thrown and the underlying stream supports it, the stream will be reset to its state prior to any bytes being read. The buffer in the underlying stream must be large enough buffer any values read prior to the exception. A buffer sized to be the largest seed record expected is sufficient and so 4096 is a reasonable buffer size.- Throws:
IOException
SeedFormatException
-
addBlockette
- Throws:
SeedFormatException
-
getBlockettes
-
getUniqueBlockette
- Throws:
SeedFormatException
-
getNumBlockettes
- Throws:
SeedFormatException
-
getBlockettes
-
getFirstPartialBlockette
if a seed blockette is continued in this record, a PartialBlockette will exist here. It will know its type and length, but will not have all its needed bytes. The prior Seed Record, possibly with reading the subsequent Seed Record should allow the remaining portion of the data to be read. This returns null in the case of no first partial blockette existing. -
getLastPartialBlockette
if a seed blockette is continued in the next record, a PartialBlockette will exist here. It will know its type and length, but will not have all its needed bytes. Reading the subsequent Seed Record should allow the remaining portion of the data to be read. This returns null in the case of no partial blockette existing. -
getControlHeader
-
toString
-
writeASCII
- Throws:
IOException
-
writeASCII
- Throws:
IOException
-
getRecordSize
public int getRecordSize()
-