Read a
ByteString directly from the specified
Handle.
This is far more efficient than reading the characters into a
String and then using
pack. First argument is the Handle
to read from, and the second is the number of bytes to read. It
returns the bytes read, up to n, or
empty if EOF has been
reached.
hGet is implemented in terms of
hGetBuf.
If the handle is a pipe or socket, and the writing end is closed,
hGet will behave as if EOF was reached.