24 #include <com/sun/star/lang/IllegalArgumentException.hpp>
35 SerfInputStream::SerfInputStream()
64 Any aRet = ::cppu::queryInterface( type,
65 static_cast< XInputStream * >(
this ),
66 static_cast< XSeekable * >(
this ) );
67 return aRet.hasValue() ? aRet : OWeakObject::queryInterface( type );
75 css::uno::Sequence< sal_Int8 >&
aData, sal_Int32 nBytesToRead )
78 sal_Int32 theBytes2Read = nBytesToRead;
79 sal_Int32 theBytesLeft = sal::static_int_cast<sal_Int32>(
mLen -
mPos);
80 if ( theBytes2Read > theBytesLeft )
81 theBytes2Read = theBytesLeft;
84 aData.realloc( theBytes2Read );
91 mPos += theBytes2Read;
100 css::uno::Sequence< sal_Int8 >&
aData, sal_Int32 nMaxBytesToRead )
103 return readBytes( aData, nMaxBytesToRead );
112 mPos += nBytesToSkip;
138 if ( location < 0 || location >
mLen )
139 throw css::lang::IllegalArgumentException();