Package ucar.nc2.jni.netcdf
Class Nc4Iosp
- java.lang.Object
-
- ucar.nc2.iosp.AbstractIOServiceProvider
-
- ucar.nc2.jni.netcdf.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
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUGDeprecated.static intNC_TURN_OFF_LOGGINGDeprecated.static StringTRANSLATE_NC4Deprecated.static StringTRANSLATE_NONEDeprecated.static StringTRANSLATECONTROLDeprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intappendStructureData(ucar.nc2.Structure s, ucar.ma2.StructureData sdata)Deprecated.voidclose()Deprecated.voidcreate(String filename, ucar.nc2.NetcdfFile ncfile, int extra, long preallocateSize, boolean largeFile)Deprecated.static voiddumpbytes(byte[] bytes, int start, int len, String tag)Deprecated.voidflush()Deprecated.static Nc4prototypesgetCLibrary()Deprecated.use NetcdfClibrary.getNativeInterfaceStringgetFileTypeDescription()Deprecated.StringgetFileTypeId()Deprecated.StringgetFileTypeVersion()Deprecated.static longgetNativeAddr(int pos, ByteBuffer buf)Deprecated.static booleanisClibraryPresent()Deprecated.use NetcdfClibrary.isLibraryPresentbooleanisValidFile(ucar.unidata.io.RandomAccessFile raf)Deprecated.Checks whetherrafis a valid file NetCDF-4 file.voidopen(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask)Deprecated.voidopenForWriting(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask)Deprecated.ucar.ma2.ArrayreadData(ucar.nc2.Variable v2, ucar.ma2.Section section)Deprecated.booleanrewriteHeader(boolean largeFile)Deprecated.ObjectsendIospMessage(Object message)Deprecated.Nc4IospsetAddReserved(boolean tf)Deprecated.voidsetChunker(ucar.nc2.write.Nc4Chunking chunker)Deprecated.static voidsetDebugFlags(ucar.nc2.util.DebugFlags flags)Deprecated.voidsetFill(boolean fill)Deprecated.static voidsetLibraryAndPath(String jnaPath, String libName)Deprecated.use NetcdfClibrary.setLibraryNameAndPathstatic intsetLogLevel(int level)Deprecated.use NetcdfClibrary.setLogLevelstatic Stringshow(SizeT[] inta)Deprecated.voidupdateAttribute(ucar.nc2.Variable v2, ucar.nc2.Attribute att)Deprecated.static voiduseHdfEos(boolean val)Deprecated.voidwriteData(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
-
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
Deprecated.- See Also:
- Constant Field Values
-
NC_TURN_OFF_LOGGING
public static int NC_TURN_OFF_LOGGING
Deprecated.
-
TRANSLATECONTROL
public static final String TRANSLATECONTROL
Deprecated.- See Also:
- Constant Field Values
-
TRANSLATE_NONE
public static final String TRANSLATE_NONE
Deprecated.- See Also:
- Constant Field Values
-
TRANSLATE_NC4
public static final String TRANSLATE_NC4
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
setLibraryAndPath
@Deprecated public static void setLibraryAndPath(String jnaPath, String libName)
Deprecated.use NetcdfClibrary.setLibraryNameAndPathset the path and name of the netcdf c library. must be called before load() is called.- Parameters:
jnaPath- path to shared librarieslibName- library name
-
isClibraryPresent
@Deprecated public static boolean isClibraryPresent()
Deprecated.use NetcdfClibrary.isLibraryPresentTest if the netcdf C library is present and loaded.- Returns:
- true if present
-
getCLibrary
@Deprecated public static Nc4prototypes getCLibrary()
Deprecated.use NetcdfClibrary.getNativeInterface
-
setLogLevel
@Deprecated public static int setLogLevel(int level)
Deprecated.use NetcdfClibrary.setLogLevelSet 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 IOExceptionDeprecated.Checks whetherrafis 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 returnstrue; otherwise it returnsfalse.- Specified by:
isValidFilein interfaceucar.nc2.iosp.IOServiceProvider- Parameters:
raf- a file on disk.- Returns:
trueifrafis 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:
getFileTypeDescriptionin interfaceucar.nc2.iosp.IOServiceProvider
-
getFileTypeId
public String getFileTypeId()
Deprecated.- Specified by:
getFileTypeIdin interfaceucar.nc2.iosp.IOServiceProvider
-
getFileTypeVersion
public String getFileTypeVersion()
Deprecated.- Specified by:
getFileTypeVersionin interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
getFileTypeVersionin classucar.nc2.iosp.AbstractIOServiceProvider
-
close
public void close() throws IOExceptionDeprecated.- Specified by:
closein interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
closein classucar.nc2.iosp.AbstractIOServiceProvider- Throws:
IOException
-
open
public void open(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask) throws IOExceptionDeprecated.- Specified by:
openin interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
openin classucar.nc2.iosp.AbstractIOServiceProvider- Throws:
IOException
-
openForWriting
public void openForWriting(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask) throws IOExceptionDeprecated.- Specified by:
openForWritingin interfaceucar.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.InvalidRangeExceptionDeprecated.- Specified by:
readDatain interfaceucar.nc2.iosp.IOServiceProvider- Throws:
IOExceptionucar.ma2.InvalidRangeException
-
create
public void create(String filename, ucar.nc2.NetcdfFile ncfile, int extra, long preallocateSize, boolean largeFile) throws IOException
Deprecated.- Specified by:
createin interfaceucar.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.InvalidRangeExceptionDeprecated.- Specified by:
writeDatain interfaceucar.nc2.iosp.IOServiceProviderWriter- Throws:
IOExceptionucar.ma2.InvalidRangeException
-
appendStructureData
public int appendStructureData(ucar.nc2.Structure s, ucar.ma2.StructureData sdata) throws IOException, ucar.ma2.InvalidRangeExceptionDeprecated.- Specified by:
appendStructureDatain interfaceucar.nc2.iosp.IOServiceProviderWriter- Throws:
IOExceptionucar.ma2.InvalidRangeException
-
flush
public void flush() throws IOExceptionDeprecated.- Specified by:
flushin interfaceucar.nc2.iosp.IOServiceProviderWriter- Throws:
IOException
-
setAddReserved
public Nc4Iosp setAddReserved(boolean tf)
Deprecated.
-
setFill
public void setFill(boolean fill)
Deprecated.- Specified by:
setFillin interfaceucar.nc2.iosp.IOServiceProviderWriter
-
rewriteHeader
public boolean rewriteHeader(boolean largeFile) throws IOExceptionDeprecated.- Specified by:
rewriteHeaderin interfaceucar.nc2.iosp.IOServiceProviderWriter- Throws:
IOException
-
updateAttribute
public void updateAttribute(ucar.nc2.Variable v2, ucar.nc2.Attribute att) throws IOExceptionDeprecated.- Specified by:
updateAttributein interfaceucar.nc2.iosp.IOServiceProviderWriter- Throws:
IOException
-
getNativeAddr
public static long getNativeAddr(int pos, ByteBuffer buf)Deprecated.
-
-