ooodev.adapter.io.seekable_partial module

class ooodev.adapter.io.seekable_partial.SeekablePartial(component, interface=com.sun.star.io.XSeekable)[source]

Bases: object

Partial Class XSeekable.

Parameters:
  • component (XSeekable) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.io.XSeekable)[source]

Constructor

Parameters:
  • component (XSeekable) – UNO Component that implements com.sun.star.io.XSeekable interface.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XSeekable.

Return type:

None

get_length()[source]

Returns the length of the stream.

Raises:

com.sun.star.io.IOExceptionIOException

Return type:

int

get_position()[source]

returns the current offset of the stream.

Raises:

com.sun.star.io.IOExceptionIOException

Return type:

int

seek(location)[source]

Changes the seek pointer to a new location relative to the beginning of the stream.

This method changes the seek pointer so subsequent reads and writes can take place at a different location in the stream object. It is an error to seek before the beginning of the stream or after the end of the stream.

Raises:
  • com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

  • com.sun.star.io.IOExceptionIOException

Return type:

None

Parameters:

location (int) –