bump product version to 5.0.4.1
[LibreOffice.git] / connectivity / source / inc / java / io / Reader.hxx
blob7dec76447f423365787c7b885bde73018fa9bb7c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_IO_READER_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_IO_READER_HXX
23 #include "java/lang/Object.hxx"
24 #include <cppuhelper/implbase1.hxx>
25 #include <com/sun/star/io/XInputStream.hpp>
26 #include <boost/optional.hpp>
28 namespace connectivity
31 //************ Class: java.io.InputStream
33 class java_io_Reader : public java_lang_Object,
34 public ::cppu::WeakImplHelper1< ::com::sun::star::io::XInputStream>
36 protected:
37 // static Data for the Class
38 static jclass theClass;
39 virtual ~java_io_Reader();
40 boost::optional<char> m_buf;
41 public:
42 virtual jclass getMyClass() const SAL_OVERRIDE;
43 // a Constructor, that is needed for when Returning the Object is needed:
44 java_io_Reader( JNIEnv * pEnv, jobject myObj );
45 // XInputStream
46 virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
47 virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
48 virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
49 virtual sal_Int32 SAL_CALL available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
50 virtual void SAL_CALL closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
53 #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_IO_READER_HXX
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */