20 #ifndef INCLUDED_OOX_HELPER_BINARYSTREAMBASE_HXX
21 #define INCLUDED_OOX_HELPER_BINARYSTREAMBASE_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
29 namespace io {
class XSeekable; }
52 virtual sal_Int64
size()
const = 0;
62 virtual sal_Int64 tell()
const = 0;
67 virtual void seek( sal_Int64
nPos ) = 0;
71 virtual void close() = 0;
83 bool isEof()
const {
return mbEof; }
88 sal_Int64 getRemaining()
const;
103 void alignToBlock( sal_Int32 nBlockSize, sal_Int64 nAnchorPos );
129 virtual sal_Int64
size()
const override;
131 virtual sal_Int64
tell()
const override;
133 virtual void seek( sal_Int64
nPos )
override;
135 virtual void close()
override;
139 const css::uno::Reference< css::io::XSeekable >& rxSeekable );
142 css::uno::Reference< css::io::XSeekable >
158 virtual sal_Int64
size()
const override;
160 virtual sal_Int64 tell()
const override;
162 virtual void seek( sal_Int64
nPos )
override;
164 virtual void close()
override;
virtual void close() override
Releases the reference to the UNO XSeekable interface.
Base class for binary stream classes.
Base class for binary input and output streams wrapping a UNO stream, seekable via the com...
virtual sal_Int64 tell() const override
Returns the current stream position, if wrapped stream is seekable, otherwise -1. ...
const bool mbSeekable
True = implementation supports seeking.
const ContentProperties & rData
BinaryStreamBase(bool bSeekable)
virtual void seek(sal_Int64 nPos) override
Seeks the stream to the passed position, if wrapped stream is seekable.
void seekToStart()
Seeks the stream to the beginning, if stream is seekable.
Base class for binary input and output streams wrapping a StreamDataSequence, which is always seekabl...
css::uno::Sequence< sal_Int8 > StreamDataSequence
virtual ~BinaryXSeekableStream() override
css::uno::Reference< css::io::XSeekable > mxSeekable
Stream seeking interface.
bool mbEof
End of stream flag.
virtual sal_Int64 size() const override
Returns the size of the stream, if wrapped stream is seekable, otherwise -1.
bool isSeekable() const
Returns true, if the implementation supports the seek() operation.
sal_Int32 mnPos
Current position in the sequence.
bool isEof() const
Returns true, if the stream position is invalid (EOF).
BinaryXSeekableStream(const css::uno::Reference< css::io::XSeekable > &rxSeekable)
const StreamDataSequence * mpData
Wrapped data sequence.
bool m_bDetectedRangeSegmentation false