LibreOffice Module package (master) 1
Public Member Functions | Private Attributes | List of all members
ByteGrabber Class Referencefinal

#include <ByteGrabber.hxx>

Public Member Functions

 ByteGrabber (css::uno::Reference< css::io::XInputStream > const &xIstream)
 ByteGrabber implements the >> operators on an XOutputStream. More...
 
 ~ByteGrabber ()
 
void setInputStream (const css::uno::Reference< css::io::XInputStream > &xNewStream)
 
sal_Int32 readBytes (css::uno::Sequence< sal_Int8 > &aData, sal_Int32 nBytesToRead)
 
void seek (sal_Int64 location)
 
sal_Int64 getPosition ()
 
sal_Int64 getLength ()
 
sal_uInt16 ReadUInt16 ()
 
sal_uInt32 ReadUInt32 ()
 
sal_Int16 ReadInt16 ()
 
sal_Int32 ReadInt32 ()
 

Private Attributes

std::mutex m_aMutex
 
css::uno::Reference< css::io::XInputStream > xStream
 
css::uno::Reference< css::io::XSeekable > xSeek
 
css::uno::Sequence< sal_Int8aSequence
 
const sal_Int8pSequence
 

Detailed Description

Definition at line 30 of file ByteGrabber.hxx.

Constructor & Destructor Documentation

◆ ByteGrabber()

ByteGrabber::ByteGrabber ( css::uno::Reference< css::io::XInputStream > const &  xIstream)

ByteGrabber implements the >> operators on an XOutputStream.

This is potentially quite slow and may need to be optimised

Definition at line 39 of file ByteGrabber.cxx.

References aSequence, pSequence, and xStream.

◆ ~ByteGrabber()

ByteGrabber::~ByteGrabber ( )

Definition at line 47 of file ByteGrabber.cxx.

Member Function Documentation

◆ getLength()

sal_Int64 ByteGrabber::getLength ( )
Exceptions
css::io::IOException
css::uno::RuntimeException

Definition at line 85 of file ByteGrabber.cxx.

References m_aMutex, THROW_WHERE, and xSeek.

◆ getPosition()

sal_Int64 ByteGrabber::getPosition ( )
Exceptions
css::io::IOException
css::uno::RuntimeException

Definition at line 76 of file ByteGrabber.cxx.

References m_aMutex, THROW_WHERE, and xSeek.

◆ readBytes()

sal_Int32 ByteGrabber::readBytes ( css::uno::Sequence< sal_Int8 > &  aData,
sal_Int32  nBytesToRead 
)
Exceptions
css::io::NotConnectedException
css::io::BufferSizeExceededException
css::io::IOException
css::uno::RuntimeException

Definition at line 59 of file ByteGrabber.cxx.

References aData, m_aMutex, and xStream.

◆ ReadInt16()

sal_Int16 ByteGrabber::ReadInt16 ( )
inline

Definition at line 64 of file ByteGrabber.hxx.

References ReadUInt16().

◆ ReadInt32()

sal_Int32 ByteGrabber::ReadInt32 ( )
inline

Definition at line 68 of file ByteGrabber.hxx.

References ReadUInt32().

◆ ReadUInt16()

sal_uInt16 ByteGrabber::ReadUInt16 ( )

Definition at line 94 of file ByteGrabber.cxx.

References aSequence, m_aMutex, pSequence, and xStream.

Referenced by ReadInt16().

◆ ReadUInt32()

sal_uInt32 ByteGrabber::ReadUInt32 ( )

Definition at line 107 of file ByteGrabber.cxx.

References aSequence, m_aMutex, pSequence, and xStream.

Referenced by ReadInt32().

◆ seek()

void ByteGrabber::seek ( sal_Int64  location)
Exceptions
css::lang::IllegalArgumentException
css::io::IOException
css::uno::RuntimeException

Definition at line 67 of file ByteGrabber.cxx.

References m_aMutex, THROW_WHERE, and xSeek.

◆ setInputStream()

void ByteGrabber::setInputStream ( const css::uno::Reference< css::io::XInputStream > &  xNewStream)

Definition at line 51 of file ByteGrabber.cxx.

References m_aMutex, xSeek, and xStream.

Member Data Documentation

◆ aSequence

css::uno::Sequence< sal_Int8 > ByteGrabber::aSequence
private

Definition at line 36 of file ByteGrabber.hxx.

Referenced by ByteGrabber(), ReadUInt16(), and ReadUInt32().

◆ m_aMutex

std::mutex ByteGrabber::m_aMutex
private

◆ pSequence

const sal_Int8* ByteGrabber::pSequence
private

Definition at line 37 of file ByteGrabber.hxx.

Referenced by ByteGrabber(), ReadUInt16(), and ReadUInt32().

◆ xSeek

css::uno::Reference< css::io::XSeekable > ByteGrabber::xSeek
private

Definition at line 35 of file ByteGrabber.hxx.

Referenced by getLength(), getPosition(), seek(), and setInputStream().

◆ xStream

css::uno::Reference< css::io::XInputStream > ByteGrabber::xStream
private

Definition at line 34 of file ByteGrabber.hxx.

Referenced by readBytes(), ReadUInt16(), ReadUInt32(), and setInputStream().


The documentation for this class was generated from the following files: