number of bytes read in, or -1 on error, or 0 on end of file.
GException on failure.
See Implementation