open

Detects the file format and opens the file using the appropriate parser.

This function first attempts to detect the file format using the provided DataAccessor, and then opens the file using the detected format's FileFormat.open method.

Return

A new file instance if the format is detected and parsing succeeds, or null if the format cannot be detected

Parameters

accessor

The data accessor that provides access to the file content

Throws

if the file format is invalid or unsupported (after successful detection)

if an I/O error occurs


Detects the file format and opens the file using the appropriate parser.

This function first attempts to detect the file format from the provided ByteArray, and then opens the file using the detected format's FileFormat.open method.

Return

A new file instance if the format is detected and parsing succeeds, or null if the format cannot be detected

Parameters

bytes

The bytes that represent the file content

Throws

if the file format is invalid or unsupported (after successful detection)


Detects the file format and opens the file using the appropriate parser.

This function first attempts to detect the file format from the file at the given path, and then opens the file using the detected format's FileFormat.open method.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance if the format is detected and parsing succeeds, or null if the format cannot be detected

Parameters

path

The path to the file

Throws

if the file format is invalid or unsupported (after successful detection)

if an I/O error occurs

if the platform does not support file access

Detects the file format and opens the file using the appropriate parser.

This function first attempts to detect the file format from the file at the given path, and then opens the file using the detected format's FileFormat.open method.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance if the format is detected and parsing succeeds, or null if the format cannot be detected

Parameters

path

The path to the file

See also

Throws

if the file format is invalid or unsupported (after successful detection)

if an I/O error occurs

if the platform does not support file access

if the path string cannot be converted to a Path

if the file does not exist

Detects the file format and opens the file using the appropriate parser.

This function first attempts to detect the file format from the file at the given path, and then opens the file using the detected format's FileFormat.open method.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance if the format is detected and parsing succeeds, or null if the format cannot be detected

Parameters

path

The path to the file

Throws

if the platform does not support file access

CommonFileException

if the file format is invalid or unsupported (after successful detection)

IOException

if an I/O error occurs

Detects the file format and opens the file using the appropriate parser.

This function first attempts to detect the file format from the file at the given path, and then opens the file using the detected format's FileFormat.open method.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance if the format is detected and parsing succeeds, or null if the format cannot be detected

Parameters

path

The path to the file

Throws

if the file format is invalid or unsupported (after successful detection)

if an I/O error occurs

if the platform does not support file access

Detects the file format and opens the file using the appropriate parser.

This function first attempts to detect the file format from the file at the given path, and then opens the file using the detected format's FileFormat.open method.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance if the format is detected and parsing succeeds, or null if the format cannot be detected

Parameters

path

The path to the file

Throws

if the file format is invalid or unsupported (after successful detection)

if an I/O error occurs

if the platform does not support file access

Detects the file format and opens the file using the appropriate parser.

This function first attempts to detect the file format from the file at the given path, and then opens the file using the detected format's FileFormat.open method.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance if the format is detected and parsing succeeds, or null if the format cannot be detected

Parameters

path

The path to the file

Throws

if the file format is invalid or unsupported (after successful detection)

if an I/O error occurs

if the platform does not support file access