public class AreaServiceProvider extends AbstractIOServiceProvider
IOServiceProvider.SortGroup
Modifier and Type | Field and Description |
---|---|
protected AreaReader |
areaReader
AREA file reader
|
location, ncfile, raf, rafOrder
Constructor and Description |
---|
AreaServiceProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the file.
|
java.lang.String |
getFileTypeDescription()
Get a human-readable description for this file type.
|
java.lang.String |
getFileTypeId()
Get a unique id for this file type.
|
boolean |
isValidFile(RandomAccessFile raf)
Is this a valid file?
|
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Open the service provider for reading.
|
void |
reacquire()
Reacquire any resources like file handles
Used when reactivating in cache.
|
Array |
readData(Variable v2,
Section section)
Read the data for the variable
|
void |
release()
Release any system resources like file handles.
|
build, buildFinish, getDetailInfo, getFileTypeVersion, getLastModified, getStructureIterator, isBuilder, readSection, readToByteChannel, readToOutputStream, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo, getSortGroup
protected AreaReader areaReader
public boolean isValidFile(RandomAccessFile raf) throws java.io.IOException
raf
- RandomAccessFile to checkjava.io.IOException
- problem reading filepublic java.lang.String getFileTypeId()
IOServiceProvider
public java.lang.String getFileTypeDescription()
IOServiceProvider
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws java.io.IOException
open
in interface IOServiceProvider
open
in class AbstractIOServiceProvider
raf
- file to read fromncfile
- netCDF file we are writing to (memory)cancelTask
- task for cancellingjava.io.IOException
- problem reading filepublic Array readData(Variable v2, Section section) throws java.io.IOException, InvalidRangeException
v2
- Variable to readsection
- section informationjava.io.IOException
- problem reading from fileInvalidRangeException
- invalid RangeRange
public void close() throws java.io.IOException
IOServiceProvider
close
in interface IOServiceProvider
close
in class AbstractIOServiceProvider
java.io.IOException
- if read errorpublic void release() throws java.io.IOException
IOServiceProvider
release
in interface IOServiceProvider
release
in class AbstractIOServiceProvider
java.io.IOException
public void reacquire() throws java.io.IOException
IOServiceProvider
reacquire
in interface IOServiceProvider
reacquire
in class AbstractIOServiceProvider
java.io.IOException