22#include <com/sun/star/io/IOException.hpp>
23#include <com/sun/star/lang/IllegalArgumentException.hpp>
31#if OSL_DEBUG_LEVEL > 0
32#define THROW_WHERE SAL_WHERE
37XInputStream_impl::XInputStream_impl(
const OUString& aUncPath,
bool bLock )
38 : m_aFile( aUncPath ),
42 sal_uInt32 nFlags = osl_File_OpenFlag_Read;
44 nFlags |= osl_File_OpenFlag_NoLock;
47 if(
err != osl::FileBase::E_None )
66 catch (io::IOException
const &)
68 OSL_FAIL(
"unexpected situation");
70 catch (uno::RuntimeException
const &)
72 OSL_FAIL(
"unexpected situation");
78 uno::Sequence< sal_Int8 >& aData,
79 sal_Int32 nBytesToRead )
83 aData.realloc(nBytesToRead);
89 != osl::FileBase::E_None)
95 if (sal::static_int_cast<sal_Int32>(nrc) != nBytesToRead)
96 aData.realloc(sal_Int32(nrc));
97 return static_cast<sal_Int32
>(nrc);
102 uno::Sequence< sal_Int8 >& aData,
103 sal_Int32 nMaxBytesToRead )
105 return readBytes( aData,nMaxBytesToRead );
112 m_aFile.
setPos( osl_Pos_Current, sal_uInt64( nBytesToSkip ) );
130 if(
err != osl::FileBase::E_None )
141 throw lang::IllegalArgumentException(
THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
142 if( osl::FileBase::E_None !=
m_aFile.
setPos( osl_Pos_Absolut, sal_uInt64( location ) ) )
153 return sal_Int64( uPos );
162 return sal_Int64( uEndPos );
::osl::FileBase::RC close()
::osl::FileBase::RC getPos(sal_uInt64 &uPos)
::osl::FileBase::RC read(void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 &rBytesRead)
::osl::FileBase::RC setPos(sal_uInt32 uHow, sal_Int64 uPos)
::osl::FileBase::RC getSize(sal_uInt64 &rSize)
::osl::FileBase::RC open(sal_uInt32 uFlags)
#define TASKHANDLER_NO_ERROR
#define TASKHANDLING_OPEN_FOR_INPUTSTREAM
constexpr OUStringLiteral aData