Library to support reading/writing binary files.
Author: Michael Hanus
Version: June 2018
openBinaryFile
:: String -> IOMode -> IO Handle
Like openFile , but open the file in binary mode.
|
hGetByte
:: Handle -> IO Int
Reads a byte from an input handle associated to a binary stream and returns it. |
hPutByte
:: Handle -> Int -> IO ()
Puts a byte to an output handle associated to a binary stream. |
hGetBinaryContents
:: Handle -> IO [Int]
Reads the complete contents from an input handle and closes the input handle before returning the contents. |
Like |
Reads a byte from an input handle associated to a binary stream and returns it. Throws an error if the end of file has been reached or the stream is not binary. |
Reads the complete contents from an input handle and closes the input handle before returning the contents. |