blob: b2c4f3753106b95deccd6866a52a2db654871a60 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>activemq-cpp-3.4.0: decaf::util::zip::CheckedInputStream Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">activemq-cpp-3.4.0</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
</ul>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> </div>
<div class="headertitle">
<h1>decaf::util::zip::CheckedInputStream Class Reference</h1> </div>
</div>
<div class="contents">
<!-- doxytag: class="decaf::util::zip::CheckedInputStream" --><!-- doxytag: inherits="decaf::io::FilterInputStream" -->
<p>An implementation of a FilterInputStream that will maintain a <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a> of the bytes read, the <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a> can then be used to verify the integrity of the input stream.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_checked_input_stream_8h_source.html">src/main/decaf/util/zip/CheckedInputStream.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for decaf::util::zip::CheckedInputStream:</div>
<div class="dyncontent">
<div class="center"><img src="classdecaf_1_1util_1_1zip_1_1_checked_input_stream__inherit__graph.png" border="0" usemap="#decaf_1_1util_1_1zip_1_1_checked_input_stream_inherit__map" alt="Inheritance graph"/></div>
<map name="decaf_1_1util_1_1zip_1_1_checked_input_stream_inherit__map" id="decaf_1_1util_1_1zip_1_1_checked_input_stream_inherit__map">
<area shape="rect" id="node2" href="classdecaf_1_1io_1_1_filter_input_stream.html" title="A FilterInputStream contains some other input stream, which it uses as its basic source of data..." alt="" coords="99,160,309,189"/><area shape="rect" id="node4" href="classdecaf_1_1io_1_1_input_stream.html" title="A base class that must be implemented by all classes wishing to provide a class that reads in a strea..." alt="" coords="116,83,292,112"/><area shape="rect" id="node6" href="classdecaf_1_1io_1_1_closeable.html" title="Interface for a class that implements the close method." alt="" coords="5,5,160,35"/><area shape="rect" id="node8" href="classdecaf_1_1util_1_1concurrent_1_1_synchronizable.html" title="The interface for all synchronizable objects (that is, objects that can be locked and unlocked)..." alt="" coords="184,5,469,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html#ac5b276fd4835679e8a45d5804e666332">CheckedInputStream</a> (InputStream *<a class="el" href="classdecaf_1_1io_1_1_filter_input_stream.html#a7f3bf93d01a14b8a0ae20f77e91c9a1a">inputStream</a>, <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html">Checksum</a> *sum, bool <a class="el" href="classdecaf_1_1io_1_1_filter_input_stream.html#a347c29a6e05c78777466ffe323872f89">own</a>=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new instance of a <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html" title="An implementation of a FilterInputStream that will maintain a Checksum of the bytes read...">CheckedInputStream</a>. <a href="#ac5b276fd4835679e8a45d5804e666332"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html#a4695c9511bdf09ae35f29725473ea482">~CheckedInputStream</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html">Checksum</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html#a6be7ed1679b279d5b0dc2004ae73b1ed">getChecksum</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a Pointer to the <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a> that is in use by this <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html" title="An implementation of a FilterInputStream that will maintain a Checksum of the bytes read...">CheckedInputStream</a>. <a href="#a6be7ed1679b279d5b0dc2004ae73b1ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual long long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html#ac381cf3ce7737a9946c5efc4f3165bb3">skip</a> (long long num)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Skips over and discards n bytes of data from this input stream.The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. The actual number of bytes skipped is returned.The skip method of <a class="el" href="classdecaf_1_1io_1_1_input_stream.html" title="A base class that must be implemented by all classes wishing to provide a class that reads in a strea...">InputStream</a> creates a byte array and then repeatedly reads into it until num bytes have been read or the end of the stream has been reached. Subclasses are encouraged to provide a more efficient implementation of this method.<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">num</td><td>The number of bytes to skip.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>total bytes skipped</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1io_1_1_i_o_exception.html">IOException</a></td><td>if an I/O error occurs. </td></tr>
<tr><td class="paramname">UnsupportedOperationException</td><td>if the concrete stream class does not support skipping bytes.</td></tr>
</table>
</dd>
</dl>
<a href="#ac381cf3ce7737a9946c5efc4f3165bb3"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html#a1248acc86ebef61745f467469e440d8b">doReadByte</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html#ac9f6b159d903ee9360fb7f435d667427">doReadArrayBounded</a> (unsigned char *buffer, int size, int offset, int length)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An implementation of a FilterInputStream that will maintain a <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a> of the bytes read, the <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a> can then be used to verify the integrity of the input stream. </p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0 </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac5b276fd4835679e8a45d5804e666332"></a><!-- doxytag: member="decaf::util::zip::CheckedInputStream::CheckedInputStream" ref="ac5b276fd4835679e8a45d5804e666332" args="(InputStream *inputStream, Checksum *sum, bool own=false)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">decaf::util::zip::CheckedInputStream::CheckedInputStream </td>
<td>(</td>
<td class="paramtype">InputStream *&#160;</td>
<td class="paramname"><em>inputStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html">Checksum</a> *&#160;</td>
<td class="paramname"><em>sum</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>own</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a new instance of a <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html" title="An implementation of a FilterInputStream that will maintain a Checksum of the bytes read...">CheckedInputStream</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">inputStream</td><td>The InputStream instance to Wrap. </td></tr>
<tr><td class="paramname">sum</td><td>The <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a> instance to use (does not take ownership of the Pointer). </td></tr>
<tr><td class="paramname">own</td><td>Indicates if this filer should take ownership of the InputStream.</td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">NullPointerException</td><td>if the <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a> pointer is NULL. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a4695c9511bdf09ae35f29725473ea482"></a><!-- doxytag: member="decaf::util::zip::CheckedInputStream::~CheckedInputStream" ref="a4695c9511bdf09ae35f29725473ea482" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual decaf::util::zip::CheckedInputStream::~CheckedInputStream </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac9f6b159d903ee9360fb7f435d667427"></a><!-- doxytag: member="decaf::util::zip::CheckedInputStream::doReadArrayBounded" ref="ac9f6b159d903ee9360fb7f435d667427" args="(unsigned char *buffer, int size, int offset, int length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual int decaf::util::zip::CheckedInputStream::doReadArrayBounded </td>
<td>(</td>
<td class="paramtype">unsigned char *&#160;</td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reimplemented from <a class="el" href="classdecaf_1_1io_1_1_filter_input_stream.html#a6d58708d0bd13acb46fa4884a0afabf3">decaf::io::FilterInputStream</a>.</p>
</div>
</div>
<a class="anchor" id="a1248acc86ebef61745f467469e440d8b"></a><!-- doxytag: member="decaf::util::zip::CheckedInputStream::doReadByte" ref="a1248acc86ebef61745f467469e440d8b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual int decaf::util::zip::CheckedInputStream::doReadByte </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reimplemented from <a class="el" href="classdecaf_1_1io_1_1_filter_input_stream.html#ab0514878c052c3b4b08954e6736a4173">decaf::io::FilterInputStream</a>.</p>
</div>
</div>
<a class="anchor" id="a6be7ed1679b279d5b0dc2004ae73b1ed"></a><!-- doxytag: member="decaf::util::zip::CheckedInputStream::getChecksum" ref="a6be7ed1679b279d5b0dc2004ae73b1ed" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html">Checksum</a>* decaf::util::zip::CheckedInputStream::getChecksum </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a Pointer to the <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a> that is in use by this <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html" title="An implementation of a FilterInputStream that will maintain a Checksum of the bytes read...">CheckedInputStream</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a> instance that is in use by this object. </dd></dl>
</div>
</div>
<a class="anchor" id="ac381cf3ce7737a9946c5efc4f3165bb3"></a><!-- doxytag: member="decaf::util::zip::CheckedInputStream::skip" ref="ac381cf3ce7737a9946c5efc4f3165bb3" args="(long long num)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual long long decaf::util::zip::CheckedInputStream::skip </td>
<td>(</td>
<td class="paramtype">long long&#160;</td>
<td class="paramname"><em>num</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Skips over and discards n bytes of data from this input stream.The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. The actual number of bytes skipped is returned.The skip method of <a class="el" href="classdecaf_1_1io_1_1_input_stream.html" title="A base class that must be implemented by all classes wishing to provide a class that reads in a strea...">InputStream</a> creates a byte array and then repeatedly reads into it until num bytes have been read or the end of the stream has been reached. Subclasses are encouraged to provide a more efficient implementation of this method.<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">num</td><td>The number of bytes to skip.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>total bytes skipped</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1io_1_1_i_o_exception.html">IOException</a></td><td>if an I/O error occurs. </td></tr>
<tr><td class="paramname">UnsupportedOperationException</td><td>if the concrete stream class does not support skipping bytes.</td></tr>
</table>
</dd>
</dl>
</p>
<p>Adds the skipped bytes into the <a class="el" href="classdecaf_1_1util_1_1zip_1_1_checksum.html" title="An interface used to represent Checksum values in the Zip package.">Checksum</a>. </p>
<p>Reimplemented from <a class="el" href="classdecaf_1_1io_1_1_filter_input_stream.html#a19d847009df788eb53c1d9dea7cbe0df">decaf::io::FilterInputStream</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/main/decaf/util/zip/<a class="el" href="_checked_input_stream_8h_source.html">CheckedInputStream.h</a></li>
</ul>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacedecaf.html">decaf</a> </li>
<li class="navelem"><a class="el" href="namespacedecaf_1_1util.html">util</a> </li>
<li class="navelem"><a class="el" href="namespacedecaf_1_1util_1_1zip.html">zip</a> </li>
<li class="navelem"><a class="el" href="classdecaf_1_1util_1_1zip_1_1_checked_input_stream.html">CheckedInputStream</a> </li>
<li class="footer">Generated on Mon Apr 25 2011 for activemq-cpp-3.4.0 by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
</body>
</html>