pdf-toolbox-core-0.0.1.1: A collection of tools for processing PDF files.

Safe HaskellNone

Pdf.Toolbox.Core.IO

Description

Basic IO operations for PDF

Synopsis

Documentation

type IS = InputStream ByteStringSource

Sequential input stream

data RIS Source

Random access Input Stream

fromHandle :: Handle -> IO RISSource

Create RIS from Handle with default chunk size

fromHandle' :: Handle -> Int -> IO RISSource

Create RIS from Handle with the specified chunk size

class Monad m => MonadIO m where

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a

Lift a computation from the IO monad.

Instances

liftIO :: MonadIO m => forall a. IO a -> m a

Lift a computation from the IO monad.

size :: MonadIO m => RIS -> PdfE m Int64Source

Total number of bytes in RIS

seek :: MonadIO m => RIS -> Int64 -> PdfE m ()Source

Change input position in RIS

tell :: MonadIO m => RIS -> PdfE m Int64Source

Current input position

parse :: MonadIO m => Parser r -> IS -> PdfE m rSource

Parse from IS

inputStream :: MonadIO m => RIS -> PdfE m ISSource

Convert random access stream to sequential

dropExactly :: MonadIO m => Int -> IS -> PdfE m ()Source

Same as readExactly, but ignores the result