Package llnl.gnem.core.io
Class FileDataSource
java.lang.Object
llnl.gnem.core.io.AbstractDataSource
llnl.gnem.core.io.FileDataSource
- All Implemented Interfaces:
DataSource
- Direct Known Subclasses:
SACFileReader
-
Field Summary
Modifier and TypeFieldDescriptionprotected byte[]
static final int
static final int
static final int
static final int
protected InputStream
protected long
protected int
protected String
Fields inherited from class llnl.gnem.core.io.AbstractDataSource
channel, nextSample, numSamplesRemaining, samplingRate, startTime, station, totalNumSamples
-
Constructor Summary
ConstructorDescriptionCreates new FileDataSourceFileDataSource
(String path, int format, int firstDataByte) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
getData
(float[] dataArray, int offset, int numRequested) void
initiate()
protected void
initiate
(InputStream fis) void
print
(PrintStream ps) void
skipSamples
(long numSamples) Methods inherited from class llnl.gnem.core.io.AbstractDataSource
getChannel, getCurrentEpochTime, getData, getEpochEndTime, getEpochStartTime, getNextSampleIndex, getNumSamplesAvailable, getSamplingRate, getStation, getTotalNumSamples
-
Field Details
-
path
-
fis
-
format
protected int format -
buffer
protected byte[] buffer -
foff
protected long foff -
CSS_T4
public static final int CSS_T4- See Also:
-
CSS_S4
public static final int CSS_S4- See Also:
-
CSS_S3
public static final int CSS_S3- See Also:
-
CSS_F4
public static final int CSS_F4- See Also:
-
-
Constructor Details
-
FileDataSource
public FileDataSource()Creates new FileDataSource -
FileDataSource
-
-
Method Details
-
initiate
public void initiate()- Specified by:
initiate
in interfaceDataSource
- Overrides:
initiate
in classAbstractDataSource
-
initiate
-
close
public void close() -
skipSamples
public void skipSamples(long numSamples) -
getData
public void getData(float[] dataArray, int offset, int numRequested) -
getfilename
-
print
- Specified by:
print
in interfaceDataSource
- Overrides:
print
in classAbstractDataSource
-