Skip to content

TiffStream

Namespace: ThinkGeo.Core.LibTiff

A stream used by the library for TIFF reading and writing.

public class TiffStream

Inheritance ObjectTiffStream

Constructors

TiffStream()

public TiffStream()

Methods

Read(Object, Byte[], Int32, Int32)

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.

public int Read(object clientData, Byte[] buffer, int offset, int count)

Parameters

clientData Object
A client data (by default, an underlying stream).

buffer Byte[]
An array of bytes. When this method returns, the contains the specified byte array with the values between and ( + - 1) replaced by the bytes read from the current source.

offset Int32
The zero-based byte offset in at which to begin storing the data read from the current stream.

count Int32
The maximum number of bytes to be read from the current stream.

Returns

Int32
The total number of bytes read into the . This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.

Write(Object, Byte[], Int32, Int32)

Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

public void Write(object clientData, Byte[] buffer, int offset, int count)

Parameters

clientData Object
A client data (by default, an underlying stream).

buffer Byte[]
An array of bytes. This method copies bytes from to the current stream.

offset Int32
The zero-based byte offset in at which to begin copying bytes to the current stream.

count Int32
The number of bytes to be written to the current stream.

Seek(Object, Int64, SeekOrigin)

Sets the position within the current stream.

public long Seek(object clientData, long offset, SeekOrigin origin)

Parameters

clientData Object
A client data (by default, an underlying stream).

offset Int64
A byte offset relative to the parameter.

origin SeekOrigin
A value of type indicating the reference point used to obtain the new position.

Returns

Int64
The new position within the current stream.

Close(Object)

Closes the current stream.

public void Close(object clientData)

Parameters

clientData Object
A client data (by default, an underlying stream).

Size(Object)

Gets the length in bytes of the stream.

public long Size(object clientData)

Parameters

clientData Object
A client data (by default, an underlying stream).

Returns

Int64
The length of the stream in bytes.