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

Example

filebuf *buf = filebuf_open(fd, FILE_BUFFERSIZE);
if (!buf) 
{    
   system_fclose(fd);
}