HPE Content Manager SDK 8.3
HP.HPTRIM.SDK.DocumentStream Class Reference

This class allows a document to be extracted as a stream, regardless of whether the document is in the local document cache or not. Calling GetAvailableData() repeatededly, until Done() returns false, gives access to the bytes of the document as they become available. More...

Inheritance diagram for HP.HPTRIM.SDK.DocumentStream:

Public Member Functions

void Dispose ()
 
 DocumentStream (Record apiRecord, bool checkDocumentOut, string comments, string saveCheckoutPathAs)
 Constructs a DocumentStream object, and begins retrieving the document. Arguments are defined similarly as for Record.GetDocument(). More...
 
 DocumentStream (Record apiRecord, bool checkDocumentOut, string comments, string saveCheckoutPathAs, long startingPosition)
 Constructs a DocumentStream object, and begins retrieving the document. Arguments are defined similarly as for Record.GetDocument(). The startingPosition parameter allows the download to commence at an arbitrary point in the document. More...
 
bool Done ()
 Returns true once GetAvailableData() has returned all the bytes of the document. Otherwise returns false. More...
 
void Seek (long newPosition)
 Seeks to a new position in the document stream. More...
 
uint GetAvailableData (byte[] buffer)
 Copies available bytes into the supplied buffer. Returns number of bytes copied. More...
 

Properties

long Length [get]
 Gets the total length of the document stream. The length is only available after the first non-zero return from GetAvailableData(). Returns -1 if the length is not available. More...
 

Detailed Description

This class allows a document to be extracted as a stream, regardless of whether the document is in the local document cache or not. Calling GetAvailableData() repeatededly, until Done() returns false, gives access to the bytes of the document as they become available.

Constructor & Destructor Documentation

HP.HPTRIM.SDK.DocumentStream.DocumentStream ( Record  apiRecord,
bool  checkDocumentOut,
string  comments,
string  saveCheckoutPathAs 
)

Constructs a DocumentStream object, and begins retrieving the document. Arguments are defined similarly as for Record.GetDocument().

HP.HPTRIM.SDK.DocumentStream.DocumentStream ( Record  apiRecord,
bool  checkDocumentOut,
string  comments,
string  saveCheckoutPathAs,
long  startingPosition 
)

Constructs a DocumentStream object, and begins retrieving the document. Arguments are defined similarly as for Record.GetDocument(). The startingPosition parameter allows the download to commence at an arbitrary point in the document.

Member Function Documentation

void HP.HPTRIM.SDK.DocumentStream.Dispose ( )
bool HP.HPTRIM.SDK.DocumentStream.Done ( )

Returns true once GetAvailableData() has returned all the bytes of the document. Otherwise returns false.

uint HP.HPTRIM.SDK.DocumentStream.GetAvailableData ( byte[]  buffer)

Copies available bytes into the supplied buffer. Returns number of bytes copied.

void HP.HPTRIM.SDK.DocumentStream.Seek ( long  newPosition)

Seeks to a new position in the document stream.

Property Documentation

long HP.HPTRIM.SDK.DocumentStream.Length
get

Gets the total length of the document stream. The length is only available after the first non-zero return from GetAvailableData(). Returns -1 if the length is not available.