1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_io_XTextOutputStream_idl__
28#define __com_sun_star_io_XTextOutputStream_idl__
29
30#ifndef __com_sun_star_io_XOutputStream_idl__
31#include <com/sun/star/io/XOutputStream.idl>
32#endif
33
34#ifndef __com_sun_star_io_IOException_idl__
35#include <com/sun/star/io/IOException.idl>
36#endif
37
38
39//=============================================================================
40
41module com {  module sun {  module star {  module io {
42
43//=============================================================================
44/** Interface to write strings to a stream using a special
45	character encoding.
46
47	<p>This interfaces allows to write strings to a stream.
48	The character encoding to be used can be set by <member>
49	setEncoding()</member>. Default encoding is "utf8".</p>
50 */
51published interface XTextOutputStream: com::sun::star::io::XOutputStream
52{
53	//-------------------------------------------------------------------------
54	/** writes a string to the stream using the encoding
55		defined by <member>setEncoding</member>.
56
57		<p>Line breaks or delimiters that may be neccessary
58		to support <member>XTextInputStream::readLine</member>
59		and <member>XTextInputStream::readString</member>
60		have to be added manually to the parameter string.</p>
61
62		@see setEncoding
63		@see XTextInputStream::readLine
64		@see XTextInputStream::readString
65	 */
66	void writeString( [in] string aString )
67			raises( com::sun::star::io::IOException );
68
69	//-------------------------------------------------------------------------
70	/** sets character encoding.
71
72		@param Encoding
73			sets the character encoding that should be used.
74			The character encoding names refer to the document
75			http://www.iana.org/assignments/character-sets.
76			Which character sets are supported depends on
77			the implementation.
78	 */
79	void setEncoding( [in] string Encoding );
80};
81
82//=============================================================================
83
84}; }; }; };
85
86#endif
87