Safe Haskell | None |
---|---|
Language | Haskell2010 |
Buffer abstracts from file IO
Synopsis
- data Buffer = Buffer {}
- toInputStream :: Buffer -> InputStream ByteString
- fromHandle :: Handle -> IO Buffer
- fromBytes :: ByteString -> IO Buffer
- dropExactly :: Int -> InputStream ByteString -> IO ()
Documentation
Interface to file
toInputStream :: Buffer -> InputStream ByteString Source #
Convert buffer to InputStream
fromHandle :: Handle -> IO Buffer Source #
Make buffer from handle
Don't touch the handle while using buffer
fromBytes :: ByteString -> IO Buffer Source #
Buffer from strict ByteString
That is mostly for testing
dropExactly :: Int -> InputStream ByteString -> IO () Source #
Drop specified number of bytes from input stream