Sun Java System Web Server 7.0 Update 5 NSAPI Developer's Guide

system_fread() Function

The system_fread function reads a specified number of bytes from a specified file into a specified buffer. This function returns the number of bytes read. Before system_fread can be used, you must open the file using any of the system_fopen functions except system_fopenWA.

Syntax

int system_fread(SYS_FILE fd, char *buf, int sz);

Return Values

The number of bytes read, which might be less than the requested size if an error occurs, or if the end of the file was reached before that number of characters were obtained.

Parameters

SYS_FILE fd is the platform-independent file descriptor.

char *buf is the buffer to receive the bytes.

int sz is the number of bytes to read.

See Also

system_errmsg() Function, system_fopenRO() Function, system_fopenRW() Function, system_fopenWA() Function, system_lseek() Function, system_fwrite() Function, system_fwrite_atomic() Function, system_flock() Function, system_ulock() Function, system_fclose() Function