public class N3iospNew extends AbstractIOServiceProvider implements IOServiceProvider
IOServiceProvider.SortGroup
Modifier and Type | Field and Description |
---|---|
protected N3headerNew |
header |
protected long |
lastModified |
protected static org.slf4j.Logger |
log |
location, ncfile, raf, rafOrder
Constructor and Description |
---|
N3iospNew() |
Modifier and Type | Method and Description |
---|---|
void |
build(RandomAccessFile raf,
Group.Builder rootGroup,
CancelTask cancelTask)
Open existing file, and populate it.
|
void |
close()
Close the file.
|
void |
flush() |
java.lang.String |
getDetailInfo()
Show debug / underlying implementation details
|
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.
|
java.lang.String |
getFileTypeVersion()
Get the version of this file type.
|
boolean |
isBuilder()
If this iosp implements build().
|
boolean |
isValidFile(RandomAccessFile raf)
Check if this is a valid file for this IOServiceProvider.
|
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Deprecated.
|
void |
reacquire()
Reacquire any resources like file handles
Used when reactivating in cache.
|
Array |
readData(Variable v2,
Section section)
Read data from a top level Variable and return a memory resident Array.
|
long |
readToByteChannel(Variable v2,
Section section,
java.nio.channels.WritableByteChannel channel)
Read data from a top level Variable and send data to a WritableByteChannel.
|
java.lang.Object |
sendIospMessage(java.lang.Object message)
A way to communicate arbitrary information to and from an iosp.
|
boolean |
syncExtend()
Extend the NetcdfFile if the underlying dataset has changed
in a way that is compatible with the current metadata.
|
java.lang.String |
toStringDebug(java.lang.Object o)
Debug info for this object.
|
buildFinish, getLastModified, getStructureIterator, readSection, readToOutputStream, release, setNetcdfFile, streamToByteChannel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildFinish, compareTo, getSortGroup, getStructureIterator, readSection, readToOutputStream, release, streamToByteChannel
protected static org.slf4j.Logger log
protected N3headerNew header
protected long lastModified
public boolean isValidFile(RandomAccessFile raf) throws java.io.IOException
IOServiceProvider
isValidFile
in interface IOServiceProvider
raf
- RandomAccessFilejava.io.IOException
- if read errorpublic java.lang.String getDetailInfo()
IOServiceProvider
getDetailInfo
in interface IOServiceProvider
getDetailInfo
in class AbstractIOServiceProvider
@Deprecated public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws java.io.IOException
IOServiceProvider
open
in interface IOServiceProvider
open
in class AbstractIOServiceProvider
raf
- the file to work on, it has already passed the isValidFile() test.ncfile
- add objects to this empty NetcdfFilecancelTask
- used to monitor user cancellation; may be null.java.io.IOException
- if read errorpublic boolean isBuilder()
IOServiceProvider
isBuilder
in interface IOServiceProvider
isBuilder
in class AbstractIOServiceProvider
public void build(RandomAccessFile raf, Group.Builder rootGroup, CancelTask cancelTask) throws java.io.IOException
IOServiceProvider
build
in interface IOServiceProvider
build
in class AbstractIOServiceProvider
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.java.io.IOException
- if read errorpublic Array readData(Variable v2, Section section) throws java.io.IOException, InvalidRangeException
IOServiceProvider
readData
in interface IOServiceProvider
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.java.io.IOException
- if read errorInvalidRangeException
- if invalid sectionRange
public long readToByteChannel(Variable v2, Section section, java.nio.channels.WritableByteChannel channel) throws java.io.IOException, InvalidRangeException
IOServiceProvider
readToByteChannel
in interface IOServiceProvider
readToByteChannel
in class AbstractIOServiceProvider
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.channel
- write data to this WritableByteChanneljava.io.IOException
- if read errorInvalidRangeException
- if invalid sectionpublic boolean syncExtend() throws java.io.IOException
IOServiceProvider
syncExtend
in interface IOServiceProvider
syncExtend
in class AbstractIOServiceProvider
java.io.IOException
- if a read error occured when accessing the underlying dataset.public void flush() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
IOServiceProvider
close
in interface IOServiceProvider
close
in class AbstractIOServiceProvider
java.io.IOException
- if read errorpublic void reacquire() throws java.io.IOException
IOServiceProvider
reacquire
in interface IOServiceProvider
reacquire
in class AbstractIOServiceProvider
java.io.IOException
public java.lang.String toStringDebug(java.lang.Object o)
IOServiceProvider
toStringDebug
in interface IOServiceProvider
toStringDebug
in class AbstractIOServiceProvider
o
- which objectpublic java.lang.Object sendIospMessage(java.lang.Object message)
IOServiceProvider
sendIospMessage
in interface IOServiceProvider
sendIospMessage
in class AbstractIOServiceProvider
message
- opaque message sent to the IOSP object when its opened (not when isValidFile() is called)public java.lang.String getFileTypeId()
IOServiceProvider
getFileTypeId
in interface IOServiceProvider
public java.lang.String getFileTypeDescription()
IOServiceProvider
getFileTypeDescription
in interface IOServiceProvider
public java.lang.String getFileTypeVersion()
IOServiceProvider
getFileTypeVersion
in interface IOServiceProvider
getFileTypeVersion
in class AbstractIOServiceProvider