Package ucar.nc2.iosp

Class AbstractIOServiceProvider

    • Constructor Detail

      • AbstractIOServiceProvider

        public AbstractIOServiceProvider()
    • Method Detail

      • buildFinish

        public void buildFinish​(NetcdfFile ncfile)
        Description copied from interface: IOServiceProvider
        Sometimes the builder needs access to the finished objects. This is called when ncfile is finished being built.
        Specified by:
        buildFinish in interface IOServiceProvider
      • release

        public void release()
                     throws IOException
        Description copied from interface: IOServiceProvider
        Release any system resources like file handles. Optional, implement only if you are able to reacquire. Used when object is made inactive in cache.
        Specified by:
        release in interface IOServiceProvider
        Throws:
        IOException
      • getSequenceIterator

        public Iterator<StructureData> getSequenceIterator​(Sequence s,
                                                           int bufferSize)
        Description copied from interface: IOServiceProvider
        Get the structure iterator. Iosps with top level sequences must override.
        Specified by:
        getSequenceIterator in interface IOServiceProvider
        Parameters:
        s - the Structure
        bufferSize - the buffersize, may be -1 for default.
        Returns:
        an iterator over the StructureData
      • sendIospMessage

        @Nullable
        public Object sendIospMessage​(@Nullable
                                      Object message)
        Description copied from interface: IOServiceProvider
        A way to communicate arbitrary information to and from an iosp.
        Specified by:
        sendIospMessage in interface IOServiceProvider
        Parameters:
        message - opaque message sent to the IOSP object when its opened (not when isValidFile() is called)
        Returns:
        opaque Object, may be null.
      • getLastModified

        public long getLastModified()
        Returns the time that the underlying file(s) were last modified. If they've changed since they were stored in the cache, they will be closed and reopened with FileFactory.
        Specified by:
        getLastModified in interface IOServiceProvider
        Returns:
        a long value representing the time the file(s) were last modified or 0L if the last-modified time couldn't be determined for any reason.
      • getFileTypeVersion

        public String getFileTypeVersion()
        Description copied from interface: IOServiceProvider
        Get the version of this file type.
        Specified by:
        getFileTypeVersion in interface IOServiceProvider
        Returns:
        version of the file type
        See Also:
        "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"