Class Nc4Iosp

  • All Implemented Interfaces:
    Comparable<ucar.nc2.iosp.IOServiceProvider>, ucar.nc2.iosp.IOServiceProvider, ucar.nc2.iosp.IOServiceProviderWriter

    @Deprecated
    public class Nc4Iosp
    extends ucar.nc2.iosp.AbstractIOServiceProvider
    implements ucar.nc2.iosp.IOServiceProviderWriter
    Deprecated.
    do not use, will be removed in ver 6.
    IOSP for reading netcdf files through JNA interface to netcdf C library
    See Also:
    , ,
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface ucar.nc2.iosp.IOServiceProvider

        ucar.nc2.iosp.IOServiceProvider.SortGroup
    • Constructor Summary

      Constructors 
      Constructor Description
      Nc4Iosp()
      Deprecated.
       
      Nc4Iosp​(ucar.nc2.NetcdfFileWriter.Version version)
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      int appendStructureData​(ucar.nc2.Structure s, ucar.ma2.StructureData sdata)
      Deprecated.
       
      void close()
      Deprecated.
       
      void create​(String filename, ucar.nc2.NetcdfFile ncfile, int extra, long preallocateSize, boolean largeFile)
      Deprecated.
       
      static void dumpbytes​(byte[] bytes, int start, int len, String tag)
      Deprecated.
       
      void flush()
      Deprecated.
       
      static Nc4prototypes getCLibrary()
      Deprecated.
      use NetcdfClibrary.getNativeInterface
      String getFileTypeDescription()
      Deprecated.
       
      String getFileTypeId()
      Deprecated.
       
      String getFileTypeVersion()
      Deprecated.
       
      static long getNativeAddr​(int pos, ByteBuffer buf)
      Deprecated.
       
      static boolean isClibraryPresent()
      Deprecated.
      use NetcdfClibrary.isLibraryPresent
      boolean isValidFile​(ucar.unidata.io.RandomAccessFile raf)
      Deprecated.
      Checks whether raf is a valid file NetCDF-4 file.
      void open​(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask)
      Deprecated.
       
      void openForWriting​(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask)
      Deprecated.
       
      ucar.ma2.Array readData​(ucar.nc2.Variable v2, ucar.ma2.Section section)
      Deprecated.
       
      boolean rewriteHeader​(boolean largeFile)
      Deprecated.
       
      Object sendIospMessage​(Object message)
      Deprecated.
       
      Nc4Iosp setAddReserved​(boolean tf)
      Deprecated.
       
      void setChunker​(ucar.nc2.write.Nc4Chunking chunker)
      Deprecated.
       
      static void setDebugFlags​(ucar.nc2.util.DebugFlags flags)
      Deprecated.
       
      void setFill​(boolean fill)
      Deprecated.
       
      static void setLibraryAndPath​(String jnaPath, String libName)
      Deprecated.
      use NetcdfClibrary.setLibraryNameAndPath
      static int setLogLevel​(int level)
      Deprecated.
      use NetcdfClibrary.setLogLevel
      static String show​(SizeT[] inta)
      Deprecated.
       
      void updateAttribute​(ucar.nc2.Variable v2, ucar.nc2.Attribute att)
      Deprecated.
       
      static void useHdfEos​(boolean val)
      Deprecated.
       
      void writeData​(ucar.nc2.Variable v2, ucar.ma2.Section section, ucar.ma2.Array values)
      Deprecated.
       
      • Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider

        build, buildFinish, getDetailInfo, getLastModified, getStructureIterator, isBuilder, reacquire, readSection, readToByteChannel, readToOutputStream, release, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
      • Methods inherited from interface ucar.nc2.iosp.IOServiceProvider

        build, buildFinish, compareTo, getDetailInfo, getSortGroup, getStructureIterator, isBuilder, reacquire, readSection, readToByteChannel, readToOutputStream, release, streamToByteChannel, syncExtend, toStringDebug
    • Constructor Detail

      • Nc4Iosp

        public Nc4Iosp()
        Deprecated.
      • Nc4Iosp

        public Nc4Iosp​(ucar.nc2.NetcdfFileWriter.Version version)
        Deprecated.
    • Method Detail

      • setLibraryAndPath

        @Deprecated
        public static void setLibraryAndPath​(String jnaPath,
                                             String libName)
        Deprecated.
        use NetcdfClibrary.setLibraryNameAndPath
        set the path and name of the netcdf c library. must be called before load() is called.
        Parameters:
        jnaPath - path to shared libraries
        libName - library name
      • isClibraryPresent

        @Deprecated
        public static boolean isClibraryPresent()
        Deprecated.
        use NetcdfClibrary.isLibraryPresent
        Test if the netcdf C library is present and loaded.
        Returns:
        true if present
      • setLogLevel

        @Deprecated
        public static int setLogLevel​(int level)
        Deprecated.
        use NetcdfClibrary.setLogLevel
        Set the log level for loaded library. Do nothing if set_log_level is not available.
      • useHdfEos

        public static void useHdfEos​(boolean val)
        Deprecated.
      • setDebugFlags

        public static void setDebugFlags​(ucar.nc2.util.DebugFlags flags)
        Deprecated.
      • setChunker

        public void setChunker​(ucar.nc2.write.Nc4Chunking chunker)
        Deprecated.
      • isValidFile

        public boolean isValidFile​(ucar.unidata.io.RandomAccessFile raf)
                            throws IOException
        Deprecated.
        Checks whether raf is a valid file NetCDF-4 file. Actually, it checks whether it is a valid HDF-5 file of any type. Furthermore, it checks whether the NetCDF C library is available on the system. If both conditions are satisfied, this method returns true; otherwise it returns false.
        Specified by:
        isValidFile in interface ucar.nc2.iosp.IOServiceProvider
        Parameters:
        raf - a file on disk.
        Returns:
        true if raf is a valid HDF-5 file and the NetCDF C library is available.
        Throws:
        IOException - if an I/O error occurs.
      • getFileTypeDescription

        public String getFileTypeDescription()
        Deprecated.
        Specified by:
        getFileTypeDescription in interface ucar.nc2.iosp.IOServiceProvider
      • getFileTypeId

        public String getFileTypeId()
        Deprecated.
        Specified by:
        getFileTypeId in interface ucar.nc2.iosp.IOServiceProvider
      • getFileTypeVersion

        public String getFileTypeVersion()
        Deprecated.
        Specified by:
        getFileTypeVersion in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        getFileTypeVersion in class ucar.nc2.iosp.AbstractIOServiceProvider
      • close

        public void close()
                   throws IOException
        Deprecated.
        Specified by:
        close in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        close in class ucar.nc2.iosp.AbstractIOServiceProvider
        Throws:
        IOException
      • open

        public void open​(ucar.unidata.io.RandomAccessFile raf,
                         ucar.nc2.NetcdfFile ncfile,
                         ucar.nc2.util.CancelTask cancelTask)
                  throws IOException
        Deprecated.
        Specified by:
        open in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        open in class ucar.nc2.iosp.AbstractIOServiceProvider
        Throws:
        IOException
      • openForWriting

        public void openForWriting​(ucar.unidata.io.RandomAccessFile raf,
                                   ucar.nc2.NetcdfFile ncfile,
                                   ucar.nc2.util.CancelTask cancelTask)
                            throws IOException
        Deprecated.
        Specified by:
        openForWriting in interface ucar.nc2.iosp.IOServiceProviderWriter
        Throws:
        IOException
      • dumpbytes

        public static void dumpbytes​(byte[] bytes,
                                     int start,
                                     int len,
                                     String tag)
        Deprecated.
      • readData

        public ucar.ma2.Array readData​(ucar.nc2.Variable v2,
                                       ucar.ma2.Section section)
                                throws IOException,
                                       ucar.ma2.InvalidRangeException
        Deprecated.
        Specified by:
        readData in interface ucar.nc2.iosp.IOServiceProvider
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • show

        public static String show​(SizeT[] inta)
        Deprecated.
      • create

        public void create​(String filename,
                           ucar.nc2.NetcdfFile ncfile,
                           int extra,
                           long preallocateSize,
                           boolean largeFile)
                    throws IOException
        Deprecated.
        Specified by:
        create in interface ucar.nc2.iosp.IOServiceProviderWriter
        Throws:
        IOException
      • writeData

        public void writeData​(ucar.nc2.Variable v2,
                              ucar.ma2.Section section,
                              ucar.ma2.Array values)
                       throws IOException,
                              ucar.ma2.InvalidRangeException
        Deprecated.
        Specified by:
        writeData in interface ucar.nc2.iosp.IOServiceProviderWriter
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • appendStructureData

        public int appendStructureData​(ucar.nc2.Structure s,
                                       ucar.ma2.StructureData sdata)
                                throws IOException,
                                       ucar.ma2.InvalidRangeException
        Deprecated.
        Specified by:
        appendStructureData in interface ucar.nc2.iosp.IOServiceProviderWriter
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • flush

        public void flush()
                   throws IOException
        Deprecated.
        Specified by:
        flush in interface ucar.nc2.iosp.IOServiceProviderWriter
        Throws:
        IOException
      • setAddReserved

        public Nc4Iosp setAddReserved​(boolean tf)
        Deprecated.
      • setFill

        public void setFill​(boolean fill)
        Deprecated.
        Specified by:
        setFill in interface ucar.nc2.iosp.IOServiceProviderWriter
      • rewriteHeader

        public boolean rewriteHeader​(boolean largeFile)
                              throws IOException
        Deprecated.
        Specified by:
        rewriteHeader in interface ucar.nc2.iosp.IOServiceProviderWriter
        Throws:
        IOException
      • updateAttribute

        public void updateAttribute​(ucar.nc2.Variable v2,
                                    ucar.nc2.Attribute att)
                             throws IOException
        Deprecated.
        Specified by:
        updateAttribute in interface ucar.nc2.iosp.IOServiceProviderWriter
        Throws:
        IOException
      • getNativeAddr

        public static long getNativeAddr​(int pos,
                                         ByteBuffer buf)
        Deprecated.
      • sendIospMessage

        public Object sendIospMessage​(Object message)
        Deprecated.
        Specified by:
        sendIospMessage in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        sendIospMessage in class ucar.nc2.iosp.AbstractIOServiceProvider