Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: connection ::
interface XConnection
Description A bidirectional bytestream. You should additionally implement XConnection2. See also XConnection2

Methods' Summary
read | reads a requested number of bytes from the connection.
write | writes the given bytesequence to the stream.
flush | Empties all internal buffers.
close | Immediately terminates any ongoing read or write calls. All subsequent read or write calls()
getDescription | A unique string describing the connection.

Methods' Details
read
long
read( | [out] sequence< byte > | aReadBytes,
| [in] long | nBytesToRead )
raises( | ::com::sun::star::io::IOException );
Description reads a requested number of bytes from the connection. This method is blocking, meaning that it always returns a bytesequence with the requested number of bytes, unless it has reached end of file (which often means, that close() has been called). please see also the readSomeBytes() method of XConnection2. Returns The read number of bytes. The return value and the length of the returned sequence must be identical. Parameter nBytesToRead The number of bytes to be read from the stream. Throws com::sun::star::io::IOException in case an error occurred during reading from the stream.
write
void
write( | [in] sequence< byte > | aData )
raises( | ::com::sun::star::io::IOException );
Description writes the given bytesequence to the stream. The method blocks until the whole sequence is written. Throws com::sun::star::io::IOException in case an error occurred during writing to the stream.
flush
void
flush()
raises( | ::com::sun::star::io::IOException );
Description Empties all internal buffers.
close
void
close()
raises( | ::com::sun::star::io::IOException );
Description Immediately terminates any ongoing read or write calls. All subsequent read or write calls()
getDescription
string
getDescription();
Description A unique string describing the connection. This string is different from the arguments to XConnection::accept and XConnector::connect. In general, the string contains an additional handle value. For example, "socket,host=localhost,port=2002,uniqueValue=2324".

Top of Page

Copyright © 2000, 2013 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.