@Deprecated public abstract class N3iosp extends AbstractIOServiceProvider implements IOServiceProviderWriter
concrete classIOServiceProvider.SortGroup| Modifier and Type | Field and Description |
|---|---|
protected boolean |
debug
Deprecated.
|
protected boolean |
debugRead
Deprecated.
|
protected boolean |
debugRecord
Deprecated.
|
protected boolean |
debugSize
Deprecated.
|
protected boolean |
debugSPIO
Deprecated.
|
protected boolean |
fill
Deprecated.
|
protected N3header |
header
Deprecated.
|
protected long |
lastModified
Deprecated.
|
static int |
MAX_NUMRECS
Deprecated.
The maximum number of records is 2^32-1.
|
static long |
MAX_VARSIZE
Deprecated.
Each fixed-size variable and the data for one record's worth of a single record variable are limited
to a little less than 4 GiB.
|
static byte |
NC_FILL_BYTE
Deprecated.
|
static char |
NC_FILL_CHAR
Deprecated.
|
static double |
NC_FILL_DOUBLE
Deprecated.
|
static float |
NC_FILL_FLOAT
Deprecated.
|
static int |
NC_FILL_INT
Deprecated.
|
static long |
NC_FILL_INT64
Deprecated.
|
static short |
NC_FILL_SHORT
Deprecated.
|
static java.lang.String |
NC_FILL_STRING
Deprecated.
|
static byte |
NC_FILL_UBYTE
Deprecated.
|
static int |
NC_FILL_UINT
Deprecated.
|
static long |
NC_FILL_UINT64
Deprecated.
|
static short |
NC_FILL_USHORT
Deprecated.
|
protected boolean |
readonly
Deprecated.
|
protected boolean |
showHeaderBytes
Deprecated.
|
protected boolean |
useRecordStructure
Deprecated.
|
location, ncfile, raf, rafOrder| Constructor and Description |
|---|
N3iosp()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
_create(RandomAccessFile raf)
Deprecated.
|
protected abstract void |
_open(RandomAccessFile raf)
Deprecated.
|
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 java.lang.String |
createValidNetcdf3ObjectName(java.lang.String name)
Deprecated.
use makeValidNetcdfObjectName
|
protected void |
fillNonRecordVariables()
Deprecated.
|
protected void |
fillRecordVariables(int recStart,
int recEnd)
Deprecated.
|
void |
flush()
Deprecated.
Flush all data buffers to disk.
|
java.lang.String |
getDetailInfo()
Deprecated.
Show debug / underlying implementation details
|
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 java.lang.Number |
getFillValueDefault(DataType dtype)
Deprecated.
|
static com.google.re2j.Pattern |
getValidNetcdf3ObjectNamePattern()
Deprecated.
Valid Netcdf Object name as a regular expression.
|
boolean |
isValidFile(RandomAccessFile raf)
Deprecated.
Check if this is a valid file for this IOServiceProvider.
|
static boolean |
isValidNetcdf3ObjectName(java.lang.String name)
Deprecated.
use isValidNetcdfObjectName
|
static boolean |
isValidNetcdfObjectName(java.lang.String name)
Deprecated.
Determine if the given name can be used for a NetCDF object, i.e.
|
static java.lang.String |
makeValidNetcdf3ObjectName(java.lang.String name)
Deprecated.
use makeValidNetcdfObjectName
|
static java.lang.String |
makeValidNetcdfObjectName(java.lang.String name)
Deprecated.
Convert a name to a legal netcdf-3 name.
|
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.
|
void |
reacquire()
Deprecated.
Reacquire any resources like file handles
Used when reactivating in cache.
|
protected abstract java.lang.Object |
readData(Layout index,
DataType dataType)
Deprecated.
Read data subset from file for a variable, create primitive array.
|
protected abstract long |
readData(Layout index,
DataType dataType,
java.nio.channels.WritableByteChannel out)
Deprecated.
|
Array |
readData(Variable v2,
Section section)
Deprecated.
Read data from a top level Variable and return a memory resident Array.
|
long |
readToByteChannel(Variable v2,
Section section,
java.nio.channels.WritableByteChannel channel)
Deprecated.
Read data from a top level Variable and send data to a WritableByteChannel.
|
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.
|
void |
setFill(boolean fill)
Deprecated.
Set the fill flag.
|
protected void |
setNumrecs(int n)
Deprecated.
|
static void |
setProperty(java.lang.String name,
java.lang.String value)
Deprecated.
Set a static property.
|
boolean |
syncExtend()
Deprecated.
Extend the NetcdfFile if the underlying dataset has changed
in a way that is compatible with the current metadata.
|
java.lang.String |
toStringDebug(java.lang.Object o)
Deprecated.
Debug info for this object.
|
void |
updateAttribute(Variable v2,
Attribute att)
Deprecated.
Update the value of an existing attribute.
|
protected abstract void |
writeData(Array aa,
Layout index,
DataType dataType)
Deprecated.
Write data subset to file for a variable, create primitive array.
|
void |
writeData(Variable v2,
Section section,
Array values)
Deprecated.
Write data into a variable.
|
build, buildFinish, getLastModified, getStructureIterator, isBuilder, readSection, readToOutputStream, release, setNetcdfFile, streamToByteChannelclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuild, buildFinish, compareTo, getSortGroup, getStructureIterator, isBuilder, readSection, readToOutputStream, release, streamToByteChannelpublic static final byte NC_FILL_BYTE
public static final char NC_FILL_CHAR
public static final short NC_FILL_SHORT
public static final int NC_FILL_INT
public static final float NC_FILL_FLOAT
public static final double NC_FILL_DOUBLE
public static final byte NC_FILL_UBYTE
public static final short NC_FILL_USHORT
public static final int NC_FILL_UINT
public static final long NC_FILL_INT64
public static final long NC_FILL_UINT64
public static final java.lang.String NC_FILL_STRING
public static final long MAX_VARSIZE
public static final int MAX_NUMRECS
protected boolean readonly
protected N3header header
protected long lastModified
protected boolean debug
protected boolean debugSize
protected boolean debugSPIO
protected boolean debugRecord
protected boolean debugRead
protected boolean showHeaderBytes
protected boolean useRecordStructure
protected boolean fill
public static java.lang.Number getFillValueDefault(DataType dtype)
public static void setProperty(java.lang.String name,
java.lang.String value)
name - property namevalue - property valuepublic static boolean isValidNetcdfObjectName(java.lang.String name)
([a-zA-Z0-9_]|{UTF8})([^\x00-\x1F\x7F/]|{UTF8})*
where UTF8 represents a multi-byte UTF-8 encoding. Also, no trailing spaces are permitted in names. We do not
allow '/' because HDF5 does not permit slashes in names as slash is used as a group separator. If UTF-8 is
supported, then a multi-byte UTF-8 character can occur anywhere within an identifier.name - the name to validate.true if the name is valid.public static java.lang.String makeValidNetcdfObjectName(java.lang.String name)
name - the name to convert.isValidNetcdfObjectName(String)public static java.lang.String makeValidNetcdf3ObjectName(java.lang.String name)
public static boolean isValidNetcdf3ObjectName(java.lang.String name)
name - test this.public static com.google.re2j.Pattern getValidNetcdf3ObjectNamePattern()
public static java.lang.String createValidNetcdf3ObjectName(java.lang.String name)
name - convert this namepublic boolean isValidFile(RandomAccessFile raf) throws java.io.IOException
IOServiceProviderisValidFile in interface IOServiceProviderraf - RandomAccessFilejava.io.IOException - if read errorpublic java.lang.String getDetailInfo()
IOServiceProvidergetDetailInfo in interface IOServiceProvidergetDetailInfo in class AbstractIOServiceProviderpublic 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 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 setFill(boolean fill)
IOServiceProviderWritersetFill in interface IOServiceProviderWriterfill - set fill mode true or falsepublic 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 long readToByteChannel(Variable v2, Section section, java.nio.channels.WritableByteChannel channel) throws java.io.IOException, InvalidRangeException
IOServiceProviderreadToByteChannel in interface IOServiceProviderreadToByteChannel in class AbstractIOServiceProviderv2 - 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.channel - write data to this WritableByteChanneljava.io.IOException - if read errorInvalidRangeException - if invalid sectionpublic 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 boolean rewriteHeader(boolean largeFile)
throws java.io.IOException
IOServiceProviderWriterrewriteHeader in interface IOServiceProviderWriterjava.io.IOExceptionpublic 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.IOExceptionInvalidRangeExceptionprotected void setNumrecs(int n)
throws java.io.IOException,
InvalidRangeException
java.io.IOExceptionInvalidRangeExceptionpublic void updateAttribute(Variable v2, Attribute att) throws java.io.IOException
updateAttribute in interface IOServiceProviderWriterv2 - variable, or null for fglobal attributeatt - replace with this valuejava.io.IOExceptionprotected void fillNonRecordVariables()
throws java.io.IOException
java.io.IOExceptionprotected void fillRecordVariables(int recStart,
int recEnd)
throws java.io.IOException,
InvalidRangeException
java.io.IOExceptionInvalidRangeExceptionpublic boolean syncExtend()
throws java.io.IOException
IOServiceProvidersyncExtend in interface IOServiceProvidersyncExtend in class AbstractIOServiceProviderjava.io.IOException - if a read error occured when accessing the underlying dataset.public void flush()
throws java.io.IOException
IOServiceProviderWriterflush in interface IOServiceProviderWriterjava.io.IOExceptionpublic void close()
throws java.io.IOException
IOServiceProviderclose in interface IOServiceProviderclose in class AbstractIOServiceProviderjava.io.IOException - if read errorpublic void reacquire()
throws java.io.IOException
IOServiceProviderreacquire in interface IOServiceProviderreacquire in class AbstractIOServiceProviderjava.io.IOExceptionpublic java.lang.String toStringDebug(java.lang.Object o)
toStringDebug in interface IOServiceProvidertoStringDebug in class AbstractIOServiceProvidero - which objectpublic 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)public java.lang.String getFileTypeId()
IOServiceProvidergetFileTypeId in interface IOServiceProviderpublic java.lang.String getFileTypeDescription()
IOServiceProvidergetFileTypeDescription in interface IOServiceProviderpublic java.lang.String getFileTypeVersion()
IOServiceProvidergetFileTypeVersion in interface IOServiceProvidergetFileTypeVersion in class AbstractIOServiceProviderprotected abstract java.lang.Object readData(Layout index, DataType dataType) throws java.io.IOException
index - handles skipping around in the file.dataType - dataType of the variablejava.io.IOException - on errorprotected abstract long readData(Layout index, DataType dataType, java.nio.channels.WritableByteChannel out) throws java.io.IOException
java.io.IOExceptionprotected abstract void writeData(Array aa, Layout index, DataType dataType) throws java.io.IOException
aa - write data from this Array.index - handles skipping around in the file.dataType - dataType of the variablejava.io.IOException - on errorprotected abstract void _open(RandomAccessFile raf)
protected abstract void _create(RandomAccessFile raf)