Utils
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| notNetcdf | 1 | Throws a non-valid NetCDF exception if the statement it's true |
| padding | 1 | Moves 1, 2, Or 3 bytes to next 4-byte boundary |
| pad4 | 1 | Round n up to the next multiple of 4. |
| ReadBE | 1 | Read size big-endian values of elementBytes bytes each and convert them with convert. |
| writeName | 1 | write name string |
| readName | 1 | Reads the name |
| readNumber | 1 | Auxiliary function to read numeric data |
| GetRecordReader | 1 | Parse record type |
| readType | 1 | Given a type And a size reads the next element. |
| sliceVector | 1 | Return a new array of the same element type containing the slice [start, start + count) of data. |
| ToBigEndianBytes | 1 | Convert a whole variable array of the given CDF type into big-endian bytes ready to be written to a CDF file. |
03 Members
Boolean, String)Throws a non-valid NetCDF exception if the statement it's true
| Name | Type | Description |
|---|---|---|
statement | Boolean | statement - Throws if true |
reason$ | String | reason - Reason to throw |
BinaryDataReader)Moves 1, 2, Or 3 bytes to next 4-byte boundary
| Name | Type | Description |
|---|---|---|
buffer | BinaryDataReader | buffer - Buffer for the file data |
Int64)Round n up to the next multiple of 4.
BinaryDataReader, Int32, Int32, Func(Of Byte(), Int32, ``0))Read size big-endian values of elementBytes bytes each and convert them with convert.
BinaryDataWriter, String)write name string
| Name | Type | Description |
|---|---|---|
output | BinaryDataWriter | - |
name | String | - |
BinaryDataReader)Reads the name
| Name | Type | Description |
|---|---|---|
buffer | BinaryDataReader | buffer - Buffer for the file data |
Name
Int32, Func(Of ``0))Auxiliary function to read numeric data
| Name | Type | Description |
|---|---|---|
size% | Int32 | size - Size of the element to read |
bufferReader | Func(Of ``0) | bufferReader - Function to read next value |
{Array<number>|number}
Nullable(Of Boolean))Parse record type
| Name | Type | Description |
|---|---|---|
type | CDFDataTypes | - |
Given a type And a size reads the next element. (这个函数会根据type类以及size的不同而返回不同的数据结果:
- 根据type可能会返回字符串或者数字
- 如果size等于1,则只会返回单个数字, 如果size大于1, 则会返回一个数组
)
| Name | Type | Description |
|---|---|---|
buffer | BinaryDataReader | buffer - Buffer for the file data |
type | CDFDataTypes | type - Type of the data to read |
size | Int32 | size - Size of the element to read |
{string|Array<number>|number}
Return a new array of the same element type containing the slice [start, start + count) of data.
Convert a whole variable array of the given CDF type into big-endian bytes ready to be written to a CDF file.