public enum NetcdfFileFormat extends Enum<NetcdfFileFormat>
Enum Constant and Description |
---|
INVALID |
NCSTREAM |
NETCDF3 |
NETCDF3_64BIT_DATA |
NETCDF3_64BIT_OFFSET |
NETCDF4 |
NETCDF4_CLASSIC |
Modifier and Type | Method and Description |
---|---|
static NetcdfFileFormat |
findNetcdfFormatType(RandomAccessFile raf)
Figure out what kind of netcdf-related file we have.
|
String |
formatName() |
boolean |
isExtendedModel() |
boolean |
isNetdf3format() |
boolean |
isNetdf4format() |
static boolean |
isValidNetcdfObjectName(String name)
Determine if the given name can be used for a NetCDF object, i.e.
|
static String |
makeValidNetcdfObjectName(String name)
Convert a name to a legal netcdf-3 name.
|
static boolean |
memequal(byte[] b1,
byte[] b2,
int len) |
static NetcdfFileFormat |
valueOf(String name)
Returns 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.
|
int |
version() |
public static final NetcdfFileFormat INVALID
public static final NetcdfFileFormat NCSTREAM
public static final NetcdfFileFormat NETCDF3
public static final NetcdfFileFormat NETCDF3_64BIT_DATA
public static final NetcdfFileFormat NETCDF3_64BIT_OFFSET
public static final NetcdfFileFormat NETCDF4
public static final NetcdfFileFormat NETCDF4_CLASSIC
public static NetcdfFileFormat findNetcdfFormatType(RandomAccessFile raf) throws IOException
raf
- to test typeIOException
public String formatName()
public boolean isExtendedModel()
public boolean isNetdf3format()
public boolean isNetdf4format()
public static boolean isValidNetcdfObjectName(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 String makeValidNetcdfObjectName(String name)
name
- the name to convert.isValidNetcdfObjectName(String)
public static boolean memequal(byte[] b1, byte[] b2, int len)
public static NetcdfFileFormat valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static NetcdfFileFormat[] values()
for (NetcdfFileFormat c : NetcdfFileFormat.values()) System.out.println(c);
public int version()