@Deprecated public class Nc4Iosp extends AbstractIOServiceProvider implements IOServiceProviderWriter
IOServiceProvider.SortGroup| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG
Deprecated.
|
static int |
NC_TURN_OFF_LOGGING
Deprecated.
|
static java.lang.String |
TRANSLATE_NC4
Deprecated.
|
static java.lang.String |
TRANSLATE_NONE
Deprecated.
|
static java.lang.String |
TRANSLATECONTROL
Deprecated.
|
location, ncfile, raf, rafOrder| Constructor and Description |
|---|
Nc4Iosp()
Deprecated.
|
Nc4Iosp(NetcdfFileWriter.Version version)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
int |
appendStructureData(Structure s,
StructureData sdata)
Deprecated.
Append a structureData along the unlimited dimension
|
void |
close()
Deprecated.
Close the file.
|
void |
create(java.lang.String filename,
NetcdfFile ncfile,
int extra,
long preallocateSize,
boolean largeFile)
Deprecated.
Create new file, populate it from the objects in ncfile.
|
static void |
dumpbytes(byte[] bytes,
int start,
int len,
java.lang.String tag)
Deprecated.
|
void |
flush()
Deprecated.
Flush all data buffers to disk.
|
static Nc4prototypes |
getCLibrary()
Deprecated.
use NetcdfClibrary.getNativeInterface
|
java.lang.String |
getFileTypeDescription()
Deprecated.
Get a human-readable description for this file type.
|
java.lang.String |
getFileTypeId()
Deprecated.
Get a unique id for this file type.
|
java.lang.String |
getFileTypeVersion()
Deprecated.
Get the version of this file type.
|
static long |
getNativeAddr(int pos,
java.nio.ByteBuffer buf)
Deprecated.
|
static boolean |
isClibraryPresent()
Deprecated.
use NetcdfClibrary.isLibraryPresent
|
boolean |
isValidFile(RandomAccessFile raf)
Deprecated.
Checks whether
raf is a valid file NetCDF-4 file. |
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Deprecated.
Open existing file, and populate ncfile with it.
|
void |
openForWriting(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Deprecated.
Open existing file and allow writing.
|
Array |
readData(Variable v2,
Section section)
Deprecated.
Read data from a top level Variable and return a memory resident Array.
|
boolean |
rewriteHeader(boolean largeFile)
Deprecated.
if theres room before data, rewrite header without moving the data.
|
java.lang.Object |
sendIospMessage(java.lang.Object message)
Deprecated.
A way to communicate arbitrary information to and from an iosp.
|
Nc4Iosp |
setAddReserved(boolean tf)
Deprecated.
|
void |
setChunker(Nc4Chunking chunker)
Deprecated.
|
static void |
setDebugFlags(DebugFlags flags)
Deprecated.
|
void |
setFill(boolean fill)
Deprecated.
Set the fill flag.
|
static void |
setLibraryAndPath(java.lang.String jnaPath,
java.lang.String libName)
Deprecated.
use NetcdfClibrary.setLibraryNameAndPath
|
static int |
setLogLevel(int level)
Deprecated.
use NetcdfClibrary.setLogLevel
|
static java.lang.String |
show(SizeT[] inta)
Deprecated.
|
void |
updateAttribute(Variable v2,
Attribute att)
Deprecated.
Update the value of an existing attribute.
|
static void |
useHdfEos(boolean val)
Deprecated.
|
void |
writeData(Variable v2,
Section section,
Array values)
Deprecated.
Write data into a variable.
|
build, buildFinish, getDetailInfo, getLastModified, getStructureIterator, isBuilder, reacquire, readSection, readToByteChannel, readToOutputStream, release, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebugclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuild, buildFinish, compareTo, getDetailInfo, getSortGroup, getStructureIterator, isBuilder, reacquire, readSection, readToByteChannel, readToOutputStream, release, streamToByteChannel, syncExtend, toStringDebugpublic static final boolean DEBUG
public static int NC_TURN_OFF_LOGGING
public static final java.lang.String TRANSLATECONTROL
public static final java.lang.String TRANSLATE_NONE
public static final java.lang.String TRANSLATE_NC4
public Nc4Iosp()
public Nc4Iosp(NetcdfFileWriter.Version version)
@Deprecated
public static void setLibraryAndPath(java.lang.String jnaPath,
java.lang.String libName)
This method will only work if the netCDF-C library was not found on the
system path. If you need to use a specific version of the C library, and
you have a different version on a system path, do not use this method.
Instead, call NetcdfClibrary.setLibraryNameAndPath prior to any uses of
the Nc4Iosp class.
jnaPath - path to shared librarieslibName - library name@Deprecated public static boolean isClibraryPresent()
@Deprecated public static Nc4prototypes getCLibrary()
@Deprecated public static int setLogLevel(int level)
public static void useHdfEos(boolean val)
public static void setDebugFlags(DebugFlags flags)
public void setChunker(Nc4Chunking chunker)
public boolean isValidFile(RandomAccessFile raf) throws java.io.IOException
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.isValidFile in interface IOServiceProviderraf - a file on disk.true if raf is a valid HDF-5 file and the NetCDF C library is available.java.io.IOException - if an I/O error occurs.public java.lang.String getFileTypeDescription()
IOServiceProvidergetFileTypeDescription in interface IOServiceProviderpublic java.lang.String getFileTypeId()
IOServiceProvidergetFileTypeId in interface IOServiceProviderpublic java.lang.String getFileTypeVersion()
IOServiceProvidergetFileTypeVersion in interface IOServiceProvidergetFileTypeVersion in class AbstractIOServiceProviderpublic void close()
throws java.io.IOException
IOServiceProviderclose in interface IOServiceProviderclose in class AbstractIOServiceProviderjava.io.IOException - if read errorpublic void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws java.io.IOException
IOServiceProvideropen in interface IOServiceProvideropen in class AbstractIOServiceProviderraf - 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 void openForWriting(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws java.io.IOException
IOServiceProviderWriteropenForWriting in interface IOServiceProviderWriterraf - the file to work on.ncfile - add objects to this empty NetcdfFilecancelTask - used to monitor user cancellation; may be null.java.io.IOException - if I/O errorpublic static void dumpbytes(byte[] bytes,
int start,
int len,
java.lang.String tag)
public Array readData(Variable v2, Section section) throws java.io.IOException, InvalidRangeException
IOServiceProviderreadData in interface IOServiceProviderv2 - 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 sectionRangepublic static java.lang.String show(SizeT[] inta)
public void create(java.lang.String filename,
NetcdfFile ncfile,
int extra,
long preallocateSize,
boolean largeFile)
throws java.io.IOException
IOServiceProviderWritercreate in interface IOServiceProviderWriterfilename - name of file to create.ncfile - get everything but data from hereextra - if > 0, pad header with extra bytespreallocateSize - if > 0, set length of file to this upon creation - this (usually) pre-allocates contiguous
storage.largeFile - if want large file formatjava.io.IOException - if I/O errorpublic void writeData(Variable v2, Section section, Array values) throws java.io.IOException, InvalidRangeException
IOServiceProviderWriterwriteData in interface IOServiceProviderWriterv2 - variable to write; must already exist.section - the section of data to write.
There must be a Range for each Dimension in the variable, in order.
The shape must match the shape of values.
The origin and stride indicate where the data is placed into the stored Variable array.values - data to write. The shape must match section.getShape().java.io.IOException - if I/O errorInvalidRangeException - if invalid sectionpublic int appendStructureData(Structure s, StructureData sdata) throws java.io.IOException, InvalidRangeException
IOServiceProviderWriterappendStructureData in interface IOServiceProviderWriters - belongs to this structuresdata - the stuctureData to appendjava.io.IOExceptionInvalidRangeExceptionpublic void flush()
throws java.io.IOException
IOServiceProviderWriterflush in interface IOServiceProviderWriterjava.io.IOExceptionpublic Nc4Iosp setAddReserved(boolean tf)
public void setFill(boolean fill)
IOServiceProviderWritersetFill in interface IOServiceProviderWriterfill - set fill mode true or falsepublic boolean rewriteHeader(boolean largeFile)
throws java.io.IOException
IOServiceProviderWriterrewriteHeader in interface IOServiceProviderWriterjava.io.IOExceptionpublic void updateAttribute(Variable v2, Attribute att) throws java.io.IOException
IOServiceProviderWriterupdateAttribute in interface IOServiceProviderWriterv2 - variable, or null for global attributeatt - replace with this valuejava.io.IOExceptionpublic static long getNativeAddr(int pos,
java.nio.ByteBuffer buf)
public java.lang.Object sendIospMessage(java.lang.Object message)
IOServiceProvidersendIospMessage in interface IOServiceProvidersendIospMessage in class AbstractIOServiceProvidermessage - opaque message sent to the IOSP object when its opened (not when isValidFile() is called)