Skip to contents

Closes the underlying connection associated with a BinaryReader or BinaryWriter object. This should be called when you're done with the reader/writer to free system resources.

Usage

# S4 method for class 'BinaryReader'
close(con)

# S4 method for class 'BinaryWriter'
close(con)

Arguments

con

The BinaryReader or BinaryWriter object to close.

Value

Invisibly returns NULL.

Examples

if (FALSE) { # \dontrun{
# Create and close a binary reader
reader <- BinaryReader("data.bin", byte_offset = 0L,
                      data_type = "double", bytes_per_element = 8L)
close(reader)

# Create and close a binary writer
writer <- BinaryWriter("output.bin", byte_offset = 0L,
                      data_type = "double", bytes_per_element = 8L)
close(writer)
} # }