Table of Contents

Class StreamInputBytes

Namespace
UglyToad.PdfPig.Core
Assembly
UglyToad.PdfPig.Core.dll

Input bytes from a stream.

public class StreamInputBytes : IInputBytes, IDisposable
Inheritance
StreamInputBytes
Implements
Inherited Members

Constructors

StreamInputBytes(Stream, bool)

Create a new StreamInputBytes.

public StreamInputBytes(Stream stream, bool shouldDispose = true)

Parameters

stream Stream

The stream to use, should be readable and seekable.

shouldDispose bool

Whether this class should dispose the stream once finished.

Properties

CurrentByte

public byte CurrentByte { get; }

Property Value

byte

CurrentOffset

public long CurrentOffset { get; }

Property Value

long

Length

public long Length { get; }

Property Value

long

Methods

Dispose()

public void Dispose()

IsAtEnd()

public bool IsAtEnd()

Returns

bool

MoveNext()

public bool MoveNext()

Returns

bool

Peek()

public byte? Peek()

Returns

byte?

Read(byte[], int?)

public int Read(byte[] buffer, int? length = null)

Parameters

buffer byte[]
length int?

Returns

int

Seek(long)

public void Seek(long position)

Parameters

position long