nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.DataStorage.netCDF / Utils

Utils

Full name Microsoft.VisualBasic.DataStorage.netCDF.Utils Assembly Microsoft.VisualBasic.DataStorage.netCDF Members 11

01 Syntax

Microsoft.VisualBasic.DataStorage.netCDF.Utils

02 Methods

NameOverloadsSummary
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

method notNetcdf #
notNetcdf(Boolean, String)

Throws a non-valid NetCDF exception if the statement it's true

Parameters
NameTypeDescription
statementBoolean

statement - Throws if true

reason$String

reason - Reason to throw

method padding #
padding(BinaryDataReader)

Moves 1, 2, Or 3 bytes to next 4-byte boundary

Parameters
NameTypeDescription
bufferBinaryDataReader

buffer - Buffer for the file data

method pad4 #
pad4(Int64)

Round n up to the next multiple of 4.

method ReadBE #
ReadBE``1(BinaryDataReader, Int32, Int32, Func(Of Byte(), Int32, ``0))

Read size big-endian values of elementBytes bytes each and convert them with convert.

method writeName #
writeName(BinaryDataWriter, String)

write name string

Parameters
NameTypeDescription
outputBinaryDataWriter

-

nameString

-

method readName #
readName(BinaryDataReader)

Reads the name

Parameters
NameTypeDescription
bufferBinaryDataReader

buffer - Buffer for the file data

Returns

Name

method readNumber #
readNumber``1(Int32, Func(Of ``0))

Auxiliary function to read numeric data

Parameters
NameTypeDescription
size%Int32

size - Size of the element to read

bufferReaderFunc(Of ``0)

bufferReader - Function to read next value

Returns

{Array<number>|number}

method GetRecordReader #
GetRecordReader(CDFDataTypes, Nullable(Of Boolean))

Parse record type

Parameters
NameTypeDescription
typeCDFDataTypes

-

method readType #
readType(BinaryDataReader, CDFDataTypes, Int32)

Given a type And a size reads the next element. (这个函数会根据type类以及size的不同而返回不同的数据结果:

  • 根据type可能会返回字符串或者数字
  • 如果size等于1,则只会返回单个数字, 如果size大于1, 则会返回一个数组

)

Parameters
NameTypeDescription
bufferBinaryDataReader

buffer - Buffer for the file data

typeCDFDataTypes

type - Type of the data to read

sizeInt32

size - Size of the element to read

Returns

{string|Array<number>|number}

method sliceVector #
sliceVector(Array, CDFDataTypes, Int32, Int32)

Return a new array of the same element type containing the slice [start, start + count) of data.

method ToBigEndianBytes #
ToBigEndianBytes(Array, CDFDataTypes, Encoding)

Convert a whole variable array of the given CDF type into big-endian bytes ready to be written to a CDF file.