IPLByteRangeSource

Tipi di dati

Descrizione

Contratto che un trasporto remoto implementa perché il lettore a byte range possa caricare un PDF tramite offset assoluti

La lunghezza totale deve essere nota prima della prima lettura di intervallo, così i chiamanti basati su seek possono dimensionare lo stream; una lettura corta è ammessa solo a fine file

Sintassi

Delphi

IPLByteRangeSource = Interface
  Function GetTotalSize: Int64;
  Function ReadRange(StartOffset: Int64; Count: Integer;
    Buffer: PAnsiChar): Integer;
  Function GetRangeSupported: Boolean;
  Function GetLastError: AnsiString;
End;

Note

GetTotalSize restituisce la lunghezza autorevole della risorsa; un valore negativo indica che la dimensione è sconosciuta

ReadRange colloca fino a Count byte a partire da StartOffset in Buffer e restituisce il numero di byte copiati

GetRangeSupported indica se il trasporto rispetta le richieste Range, e GetLastError restituisce un testo leggibile sull'ultimo errore del trasporto

Vedere anche

IPLByteRangeAvailabilitySource, BuildLinearizedURLAccessPlan, LoadFromRangeSource, TByteRangeStreamReadAt