@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, toStringDebug
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, buildFinish, compareTo, getDetailInfo, getSortGroup, getStructureIterator, isBuilder, reacquire, readSection, readToByteChannel, readToOutputStream, release, streamToByteChannel, syncExtend, toStringDebug
public 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)
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 IOServiceProvider
raf
- 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()
IOServiceProvider
getFileTypeDescription
in interface IOServiceProvider
public java.lang.String getFileTypeId()
IOServiceProvider
getFileTypeId
in interface IOServiceProvider
public java.lang.String getFileTypeVersion()
IOServiceProvider
getFileTypeVersion
in interface IOServiceProvider
getFileTypeVersion
in class AbstractIOServiceProvider
public void close() throws java.io.IOException
IOServiceProvider
close
in interface IOServiceProvider
close
in class AbstractIOServiceProvider
java.io.IOException
- if read errorpublic 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 void openForWriting(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws java.io.IOException
IOServiceProviderWriter
openForWriting
in interface IOServiceProviderWriter
raf
- 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
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 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
IOServiceProviderWriter
create
in interface IOServiceProviderWriter
filename
- 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
IOServiceProviderWriter
writeData
in interface IOServiceProviderWriter
v2
- 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
IOServiceProviderWriter
appendStructureData
in interface IOServiceProviderWriter
s
- belongs to this structuresdata
- the stuctureData to appendjava.io.IOException
InvalidRangeException
public void flush() throws java.io.IOException
IOServiceProviderWriter
flush
in interface IOServiceProviderWriter
java.io.IOException
public Nc4Iosp setAddReserved(boolean tf)
public void setFill(boolean fill)
IOServiceProviderWriter
setFill
in interface IOServiceProviderWriter
fill
- set fill mode true or falsepublic boolean rewriteHeader(boolean largeFile) throws java.io.IOException
IOServiceProviderWriter
rewriteHeader
in interface IOServiceProviderWriter
java.io.IOException
public void updateAttribute(Variable v2, Attribute att) throws java.io.IOException
IOServiceProviderWriter
updateAttribute
in interface IOServiceProviderWriter
v2
- variable, or null for global attributeatt
- replace with this valuejava.io.IOException
public static long getNativeAddr(int pos, java.nio.ByteBuffer buf)
public 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)