Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

writeToBinaryFile(filepath, bytes [, append])

Package

file

Alias

...

Pkg Usage

writeBinary(

...

filepath, bytes [, append])

Description

Excerpt
hiddentrue
Prints bytes to a specified file. The file can be overwritten or appended to.

Prints bytes to a specified file. The file can be overwritten or appended to.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

filepath

...

String

Yes

Specifies the file name to write in.

bytes

...

Byte []

...

(Array of bytes)

Yes

Specifies the bytes to be written to the file.

append

...

Boolean

No

'true' if new bytes are added to the end of the file, otherwise 'false' (default) the whole file will be overwritten.

Return

...

Type

Integer

Return value represents the number of bytes written to the file.

Example

Example 1

Code Block
writeToBinaryFile("C:/myData.dat", dataBytes[], true)

Writes (appends) the data from the dataBytes variable to the file “myData"myData.dat”dat".

...

Note

It is recommended that you use forward slashes ( / ) for file paths. As a general observation use the silEnv() routine to create an absolute path.

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "file_

...

routine" and space = currentSpace ( )
labels

...

array_routines