Package ucar.nc2.write
Enum NetcdfFileFormat
- All Implemented Interfaces:
Serializable,Comparable<NetcdfFileFormat>
Enumeration of the kinds of NetCDF file formats. NETCDF3_64BIT_DATA is not currently supported.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic NetcdfFileFormatFigure out what kind of netcdf-related file we have.booleanbooleanbooleanbooleanDeprecated.booleanDeprecated.static booleanDetermine if the given name can be used for a NetCDF object, i.e.static StringConvert a name to a legal netcdf-3 name.static booleanmemequal(byte[] b1, byte[] b2, int len) static NetcdfFileFormatReturns the enum constant of this type with the specified name.static NetcdfFileFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.intversion()
-
Enum Constant Details
-
INVALID
-
NETCDF3
-
NETCDF3_64BIT_OFFSET
-
NETCDF4
-
NETCDF4_CLASSIC
-
NETCDF3_64BIT_DATA
-
NCSTREAM
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
version
public int version() -
formatName
-
isNetcdf3Format
public boolean isNetcdf3Format() -
isNetdf3format
public boolean isNetdf3format()Deprecated.- Returns:
-
isNetcdf4Format
public boolean isNetcdf4Format() -
isNetdf4format
public boolean isNetdf4format()Deprecated.- Returns:
-
isExtendedModel
public boolean isExtendedModel() -
findNetcdfFormatType
Figure out what kind of netcdf-related file we have. Constraint: leave raf read pointer to point just after the magic number.- Parameters:
raf- to test type- Returns:
- NetcdfFileFormat that matches constants in netcdf-c/include/netcdf.h, or INVALID if not a netcdf file.
- Throws:
IOException
-
memequal
public static boolean memequal(byte[] b1, byte[] b2, int len) -
isValidNetcdfObjectName
Determine if the given name can be used for a NetCDF object, i.e. a Dimension, Attribute, or Variable. The allowed name syntax (in RE form) is:([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.- Parameters:
name- the name to validate.- Returns:
trueif the name is valid.
-
makeValidNetcdfObjectName
Convert a name to a legal netcdf-3 name.- Parameters:
name- the name to convert.- Returns:
- the converted name.
- See Also:
-
isNetcdf3Format()