public interface IOServiceProvider extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
build(RandomAccessFile raf,
Group.Builder rootGroup,
CancelTask cancelTask)
Read an existing RandomAccessFile, and populate rootGroup.
|
void |
buildFinish(NetcdfFile ncfile)
Sometimes the builder needs access to the finished objects.
|
void |
close()
Close the file.
|
String |
getDetailInfo()
Show debug / underlying implementation details
|
String |
getFileTypeDescription()
Get a human-readable description for this file type.
|
String |
getFileTypeId()
Get a unique id for this file type.
|
String |
getFileTypeVersion()
Get the version of this file type.
|
long |
getLastModified()
Get last time the file was modified.
|
Iterator<StructureData> |
getStructureDataArrayIterator(Sequence s,
int bufferSize)
Get the structure iterator.
|
StructureDataIterator |
getStructureIterator(Structure s,
int bufferSize)
Deprecated.
use getStructureDataArrayIterator
|
boolean |
isValidFile(RandomAccessFile raf)
Check if this is a valid file for this IOServiceProvider.
|
void |
reacquire()
Reacquire any resources like file handles
Used when reactivating in cache.
|
Array<?> |
readArrayData(Variable v2,
Section section)
Read data from a top level Variable and return a memory resident Array.
|
default Array |
readData(Variable v2,
Section section)
Deprecated.
use readArrayData
|
Array |
readSection(ParsedSectionSpec cer)
Deprecated.
do not use.
|
long |
readToOutputStream(Variable v2,
Section section,
OutputStream out)
Deprecated.
do not use.
|
void |
release()
Release any system resources like file handles.
|
Object |
sendIospMessage(Object message)
A way to communicate arbitrary information to and from an iosp.
|
String |
toStringDebug(Object o)
Debug info for this object.
|
boolean isValidFile(RandomAccessFile raf) throws IOException
raf - RandomAccessFileIOException - if read errorvoid build(RandomAccessFile raf, Group.Builder rootGroup, CancelTask cancelTask) throws IOException
raf - the file to work on, it has already passed the isValidFile() test.rootGroup - add objects to the root group.cancelTask - used to monitor user cancellation; may be null.IOException - if read errorvoid buildFinish(NetcdfFile ncfile)
@Deprecated default Array readData(Variable v2, Section section) throws IOException, InvalidRangeException
IOExceptionInvalidRangeExceptionArray<?> readArrayData(Variable v2, Section section) throws IOException, InvalidRangeException
v2 - a top-level Variablesection - the section of data to read. There must be a Range for each Dimension in the variable, in order.
Note: no nulls allowed. IOSP may not modify.IOExceptionInvalidRangeException@Deprecated long readToOutputStream(Variable v2, Section section, OutputStream out) throws IOException, InvalidRangeException
v2 - a top-level Variablesection - the section of data to read.
There must be a Range for each Dimension in the variable, in order.
Note: no nulls allowed. IOSP may not modify.out - write data to this OutputStreamIOException - if read errorInvalidRangeException - if invalid section@Deprecated Array readSection(ParsedSectionSpec cer) throws IOException, InvalidRangeException
IOExceptionInvalidRangeException@Deprecated StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws IOException
IOExceptionIterator<StructureData> getStructureDataArrayIterator(Sequence s, int bufferSize)
s - the StructurebufferSize - the buffersize, may be -1 for default.void close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOException - if read errorvoid release()
throws IOException
IOExceptionvoid reacquire()
throws IOException
IOExceptionlong getLastModified()
@Nullable Object sendIospMessage(@Nullable Object message)
message - opaque message sent to the IOSP object when its opened (not when isValidFile() is called)String toStringDebug(Object o)
o - which objectString getDetailInfo()
String getFileTypeId()
String getFileTypeVersion()
String getFileTypeDescription()