1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/tools/qcstring.cpp:488 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>QByteArray Class</title>
|
---|
7 | <style type="text/css"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { background: #ffffff; color: black; }
|
---|
12 | --></style>
|
---|
13 | </head>
|
---|
14 | <body>
|
---|
15 |
|
---|
16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
17 | <tr bgcolor="#E5E5E5">
|
---|
18 | <td valign=center>
|
---|
19 | <a href="index.html">
|
---|
20 | <font color="#004faf">Home</font></a>
|
---|
21 | | <a href="classes.html">
|
---|
22 | <font color="#004faf">All Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main Classes</font></a>
|
---|
25 | | <a href="annotated.html">
|
---|
26 | <font color="#004faf">Annotated</font></a>
|
---|
27 | | <a href="groups.html">
|
---|
28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
29 | | <a href="functions.html">
|
---|
30 | <font color="#004faf">Functions</font></a>
|
---|
31 | </td>
|
---|
32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QByteArray Class Reference</h1>
|
---|
33 |
|
---|
34 | <p>The QByteArray class provides an array of bytes.
|
---|
35 | <a href="#details">More...</a>
|
---|
36 | <p>All the functions in this class are <a href="threads.html#reentrant">reentrant</a> when Qt is built with thread support.</p>
|
---|
37 | <p><tt>#include <<a href="qcstring-h.html">qcstring.h</a>></tt>
|
---|
38 | <p>Inherits <a href="qmemarray.html">QMemArray</a><char>.
|
---|
39 | <p>Inherited by <a href="qbitarray.html">QBitArray</a> and <a href="qcstring.html">QCString</a>.
|
---|
40 | <p><a href="qbytearray-members.html">List of all member functions.</a>
|
---|
41 | <h2>Public Members</h2>
|
---|
42 | <ul>
|
---|
43 | <li class=fn><a href="#QByteArray"><b>QByteArray</b></a> ()</li>
|
---|
44 | <li class=fn><a href="#QByteArray-2"><b>QByteArray</b></a> ( int size )</li>
|
---|
45 | </ul>
|
---|
46 | <h2>Related Functions</h2>
|
---|
47 | <ul>
|
---|
48 | <li class=fn>QByteArray <a href="#qCompress"><b>qCompress</b></a> ( const QByteArray & data )</li>
|
---|
49 | <li class=fn>QByteArray <a href="#qCompress-2"><b>qCompress</b></a> ( const uchar * data, int nbytes )</li>
|
---|
50 | <li class=fn>QByteArray <a href="#qUncompress"><b>qUncompress</b></a> ( const QByteArray & data )</li>
|
---|
51 | <li class=fn>QByteArray <a href="#qUncompress-2"><b>qUncompress</b></a> ( const uchar * data, int nbytes )</li>
|
---|
52 | </ul>
|
---|
53 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
54 |
|
---|
55 |
|
---|
56 |
|
---|
57 | The QByteArray class provides an array of bytes.
|
---|
58 | <p>
|
---|
59 |
|
---|
60 | <p> The QByteArray class provides an <a href="shclass.html#explicitly-shared">explicitly shared</a> array of bytes.
|
---|
61 | It is useful for manipulating memory areas with custom data.
|
---|
62 | QByteArray is implemented as a <a href="qmemarray.html">QMemArray</a><char>. See the <a href="qmemarray.html">QMemArray</a> documentation for further information.
|
---|
63 | <p>See also <a href="collection.html">Collection Classes</a> and <a href="tools.html">Non-GUI Classes</a>.
|
---|
64 |
|
---|
65 | <hr><h2>Member Function Documentation</h2>
|
---|
66 | <h3 class=fn><a name="QByteArray"></a>QByteArray::QByteArray ()
|
---|
67 | </h3>
|
---|
68 |
|
---|
69 | <p> Constructs an empty QByteArray.
|
---|
70 |
|
---|
71 | <h3 class=fn><a name="QByteArray-2"></a>QByteArray::QByteArray ( int size )
|
---|
72 | </h3>
|
---|
73 |
|
---|
74 | <p> Constructs a QByteArray of size <em>size</em>.
|
---|
75 |
|
---|
76 | <hr><h2>Related Functions</h2>
|
---|
77 | <h3 class=fn><a href="qbytearray.html">QByteArray</a> <a name="qCompress"></a>qCompress ( const <a href="qbytearray.html">QByteArray</a> & data )
|
---|
78 | </h3>
|
---|
79 |
|
---|
80 | <p>
|
---|
81 | <p> Compresses the array <em>data</em> and returns the compressed byte
|
---|
82 | array using zlib.
|
---|
83 | <p> <p>See also <a href="#qUncompress">qUncompress</a>().
|
---|
84 |
|
---|
85 | <h3 class=fn><a href="qbytearray.html">QByteArray</a> <a name="qCompress-2"></a>qCompress ( const uchar * data, int nbytes )
|
---|
86 | </h3>
|
---|
87 |
|
---|
88 | <p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
89 | <p> Compresses the array <em>data</em> which is <em>nbytes</em> long and returns the
|
---|
90 | compressed byte array.
|
---|
91 |
|
---|
92 | <h3 class=fn><a href="qbytearray.html">QByteArray</a> <a name="qUncompress"></a>qUncompress ( const <a href="qbytearray.html">QByteArray</a> & data )
|
---|
93 | </h3>
|
---|
94 |
|
---|
95 | <p>
|
---|
96 | <p> Uncompresses the array <em>data</em> and returns the uncompressed byte
|
---|
97 | array.
|
---|
98 | <p> Returns an empty QByteArray if the input data was corrupt.
|
---|
99 |
|
---|
100 | <p> <p>See also <a href="#qCompress">qCompress</a>().
|
---|
101 |
|
---|
102 | <h3 class=fn><a href="qbytearray.html">QByteArray</a> <a name="qUncompress-2"></a>qUncompress ( const uchar * data, int nbytes )
|
---|
103 | </h3>
|
---|
104 |
|
---|
105 | <p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
106 | <p> Uncompresses the array <em>data</em> which is <em>nbytes</em> long and returns
|
---|
107 | the uncompressed byte array.
|
---|
108 |
|
---|
109 | <!-- eof -->
|
---|
110 | <hr><p>
|
---|
111 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
112 | Copyright © 1995-2007
|
---|
113 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
114 | <table width=100% cellspacing=0 border=0><tr>
|
---|
115 | <td>Copyright © 2007
|
---|
116 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
117 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
118 | </table></div></address></body>
|
---|
119 | </html>
|
---|