Stream

class Closeable a

A class of resources that must be closed after use.

close :: Closeable a => a -> <Proc> ()

Closes the resource. Closing an already closed resource has no effect.

data InputStream

A stream of bytes that can be read.

data OutputStream

A stream of bytes that can be written.

Undocumented entities

createBuffer :: () -> <Proc> Buffer

Creates a new empty buffer.

openForReading :: Readable a => a -> <Proc> InputStream

Opens an input stream for reading the given source. The caller must close the stream.

openForWriting :: Writable a => a -> <Proc> OutputStream

Opens an output stream for writing the given target. The caller must close the stream.

toByteArray :: Buffer -> <Proc> Vector Byte

The contents written to the buffer as a byte array.