Package ucar.nc2.iosp
Enum NetcdfFileFormat
- java.lang.Object
-
- java.lang.Enum<NetcdfFileFormat>
-
- ucar.nc2.iosp.NetcdfFileFormat
-
- All Implemented Interfaces:
Serializable
,Comparable<NetcdfFileFormat>
public enum NetcdfFileFormat extends Enum<NetcdfFileFormat>
Enumeration of the kinds of NetCDF file formats. NETCDF3_64BIT_DATA is not currently supported in this library.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INVALID
NETCDF3
NETCDF3_64BIT_DATA
NETCDF3_64BIT_OFFSET
NETCDF4
NETCDF4_CLASSIC
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NetcdfFileFormat
findNetcdfFormatType(RandomAccessFile raf)
Figure out what kind of netcdf-related file we have.String
formatName()
boolean
isClassicModel()
boolean
isExtendedModel()
boolean
isLargeFile()
boolean
isNetdf3format()
boolean
isNetdf4format()
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()
-
-
-
Enum Constant Detail
-
INVALID
public static final NetcdfFileFormat INVALID
-
NETCDF3
public static final NetcdfFileFormat NETCDF3
-
NETCDF3_64BIT_OFFSET
public static final NetcdfFileFormat NETCDF3_64BIT_OFFSET
-
NETCDF4
public static final NetcdfFileFormat NETCDF4
-
NETCDF4_CLASSIC
public static final NetcdfFileFormat NETCDF4_CLASSIC
-
NETCDF3_64BIT_DATA
public static final NetcdfFileFormat NETCDF3_64BIT_DATA
-
-
Method Detail
-
values
public static NetcdfFileFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NetcdfFileFormat c : NetcdfFileFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NetcdfFileFormat valueOf(String name)
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
public String formatName()
-
isNetdf3format
public boolean isNetdf3format()
-
isNetdf4format
public boolean isNetdf4format()
-
isExtendedModel
public boolean isExtendedModel()
-
isLargeFile
public boolean isLargeFile()
-
isClassicModel
public boolean isClassicModel()
-
findNetcdfFormatType
public static NetcdfFileFormat findNetcdfFormatType(RandomAccessFile raf) throws IOException
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
-
-