683 lines
27 KiB
HTML
683 lines
27 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_152-release) on Fri Oct 06 17:56:11 CEST 2017 -->
|
|
<title>ArchiveInputStream</title>
|
|
<meta name="date" content="2017-10-06">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="ArchiveInputStream";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../../no/nordicsemi/android/dfu/internal/HexInputStream.html" title="class in no.nordicsemi.android.dfu.internal"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?no/nordicsemi/android/dfu/internal/ArchiveInputStream.html" target="_top">Frames</a></li>
|
|
<li><a href="ArchiveInputStream.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#fields.inherited.from.class.java.util.zip.ZipInputStream">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">no.nordicsemi.android.dfu.internal</div>
|
|
<h2 title="Class ArchiveInputStream" class="title">Class ArchiveInputStream</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>java.io.InputStream</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>java.io.FilterInputStream</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>java.util.zip.InflaterInputStream</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>java.util.zip.ZipInputStream</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>no.nordicsemi.android.dfu.internal.ArchiveInputStream</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd>java.io.Closeable, java.lang.AutoCloseable</dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">ArchiveInputStream</span>
|
|
extends java.util.zip.ZipInputStream</pre>
|
|
<div class="block"><p>Reads the firmware files from the a ZIP file. The ZIP file must be either created using the <b>nrf utility</b> tool, available together with Master Control Panel v3.8.0+,
|
|
or follow the backward compatibility syntax: must contain only files with names: application.hex/bin, softdevice.hex/dat or bootloader.hex/bin, optionally also application.dat
|
|
and/or system.dat with init packets.</p>
|
|
<p>The ArchiveInputStream will read only files with types specified by <b>types</b> parameter of the constructor.</p></div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.java.util.zip.ZipInputStream">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from class java.util.zip.ZipInputStream</h3>
|
|
<code>CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTLEN, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.java.util.zip.InflaterInputStream">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from class java.util.zip.InflaterInputStream</h3>
|
|
<code>buf, closed, inf, len</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.java.io.FilterInputStream">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from class java.io.FilterInputStream</h3>
|
|
<code>in</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#ArchiveInputStream-java.io.InputStream-int-int-">ArchiveInputStream</a></span>(java.io.InputStream stream,
|
|
int mbrSize,
|
|
int types)</code>
|
|
<div class="block">
|
|
The ArchiveInputStream read HEX or BIN files from the Zip stream.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#applicationImageSize--">applicationImageSize</a></span>()</code>
|
|
<div class="block">Returns the total size of the Application firmware.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#available--">available</a></span>()</code>
|
|
<div class="block">Returns the number of bytes that has not been read yet.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#bootloaderImageSize--">bootloaderImageSize</a></span>()</code>
|
|
<div class="block">Returns the total size of the Bootloader firmware.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#close--">close</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>byte[]</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#getApplicationInit--">getApplicationInit</a></span>()</code>
|
|
<div class="block">Returns the content of the init file for the Application or <code>null</code> if no application file in the ZIP, or the DAT file is not provided.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#getBytesRead--">getBytesRead</a></span>()</code>
|
|
<div class="block">Returns number of bytes read until now.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#getContentType--">getContentType</a></span>()</code>
|
|
<div class="block">Returns the content type based on the content of the ZIP file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#getCrc32--">getCrc32</a></span>()</code>
|
|
<div class="block">Returns the CRC32 of the part of the firmware that was already read.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>byte[]</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#getSystemInit--">getSystemInit</a></span>()</code>
|
|
<div class="block">Returns the content of the init file for SoftDevice and/or Bootloader.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#isSecureDfuRequired--">isSecureDfuRequired</a></span>()</code>
|
|
<div class="block">This method returns true if the content of the ZIP file may be sent only using Secure DFU.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#mark-int-">mark</a></span>(int readlimit)</code>
|
|
<div class="block">Marks the current position in the stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#markSupported--">markSupported</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#read-byte:A-">read</a></span>(byte[] buffer)</code> </td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#reset--">reset</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#setContentType-int-">setContentType</a></span>(int type)</code>
|
|
<div class="block">Truncates the current content type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#softDeviceImageSize--">softDeviceImageSize</a></span>()</code>
|
|
<div class="block">Returns the total size of the SoftDevice firmware.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.util.zip.ZipInputStream">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.util.zip.ZipInputStream</h3>
|
|
<code>closeEntry, createZipEntry, getNextEntry, read, skip</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.util.zip.InflaterInputStream">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.util.zip.InflaterInputStream</h3>
|
|
<code>fill, read</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="ArchiveInputStream-java.io.InputStream-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>ArchiveInputStream</h4>
|
|
<pre>public ArchiveInputStream(java.io.InputStream stream,
|
|
int mbrSize,
|
|
int types)
|
|
throws java.io.IOException</pre>
|
|
<div class="block"><p>
|
|
The ArchiveInputStream read HEX or BIN files from the Zip stream. It may skip some of them, depending on the value of the types parameter.
|
|
This is useful if the DFU service wants to send the Soft Device and Bootloader only, and then the Application in the following connection, despite
|
|
the ZIP file contains all 3 HEX/BIN files.
|
|
When types is equal to <a href="../../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_AUTO"><code>DfuBaseService.TYPE_AUTO</code></a> all present files are read.
|
|
</p>
|
|
<p>Use bit combination of the following types:</p>
|
|
<ul>
|
|
<li><a href="../../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_SOFT_DEVICE"><code>DfuBaseService.TYPE_SOFT_DEVICE</code></a></li>
|
|
<li><a href="../../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_BOOTLOADER"><code>DfuBaseService.TYPE_BOOTLOADER</code></a></li>
|
|
<li><a href="../../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_APPLICATION"><code>DfuBaseService.TYPE_APPLICATION</code></a></li>
|
|
<li><a href="../../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_AUTO"><code>DfuBaseService.TYPE_AUTO</code></a></li>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>stream</code> - the Zip Input Stream</dd>
|
|
<dd><code>mbrSize</code> - The size of the MRB segment (Master Boot Record) on the device. The parser will cut data from addresses below that number from all HEX files.</dd>
|
|
<dd><code>types</code> - File types that are to be read from the ZIP. Use <a href="../../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_APPLICATION"><code>DfuBaseService.TYPE_APPLICATION</code></a> etc.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.io.IOException</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="close--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>close</h4>
|
|
<pre>public void close()
|
|
throws java.io.IOException</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code>close</code> in interface <code>java.io.Closeable</code></dd>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>close</code> in class <code>java.util.zip.ZipInputStream</code></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.io.IOException</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="read-byte:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>read</h4>
|
|
<pre>public int read(@NonNull
|
|
byte[] buffer)
|
|
throws java.io.IOException</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>read</code> in class <code>java.io.FilterInputStream</code></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.io.IOException</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="markSupported--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>markSupported</h4>
|
|
<pre>public boolean markSupported()</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>markSupported</code> in class <code>java.util.zip.InflaterInputStream</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="mark-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>mark</h4>
|
|
<pre>public void mark(int readlimit)</pre>
|
|
<div class="block">Marks the current position in the stream. The parameter is ignored.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>mark</code> in class <code>java.util.zip.InflaterInputStream</code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>readlimit</code> - this parameter is ignored, can be anything</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="reset--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>reset</h4>
|
|
<pre>public void reset()
|
|
throws java.io.IOException</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>reset</code> in class <code>java.util.zip.InflaterInputStream</code></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.io.IOException</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getBytesRead--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBytesRead</h4>
|
|
<pre>public int getBytesRead()</pre>
|
|
<div class="block">Returns number of bytes read until now.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getCrc32--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCrc32</h4>
|
|
<pre>public long getCrc32()</pre>
|
|
<div class="block">Returns the CRC32 of the part of the firmware that was already read.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the CRC</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getContentType--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getContentType</h4>
|
|
<pre>public int getContentType()</pre>
|
|
<div class="block">Returns the content type based on the content of the ZIP file. The content type may be truncated using <a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#setContentType-int-"><code>setContentType(int)</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a bit field of <a href="../../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_SOFT_DEVICE"><code>TYPE_SOFT_DEVICE</code></a>, <a href="../../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_BOOTLOADER"><code>TYPE_BOOTLOADER</code></a> and <a href="../../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_APPLICATION"><code>TYPE_APPLICATION</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setContentType-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setContentType</h4>
|
|
<pre>public int setContentType(int type)</pre>
|
|
<div class="block">Truncates the current content type. May be used to hide some files, e.g. to send Soft Device and Bootloader without Application or only the Application.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>type</code> - the new type</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the final type after truncating</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="available--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>available</h4>
|
|
<pre>public int available()</pre>
|
|
<div class="block">Returns the number of bytes that has not been read yet. This value includes only firmwares matching the content type set by the construcotor or the <a href="../../../../../no/nordicsemi/android/dfu/internal/ArchiveInputStream.html#setContentType-int-"><code>setContentType(int)</code></a> method.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>available</code> in class <code>java.util.zip.ZipInputStream</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="softDeviceImageSize--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>softDeviceImageSize</h4>
|
|
<pre>public int softDeviceImageSize()</pre>
|
|
<div class="block">Returns the total size of the SoftDevice firmware. In case the firmware was given as a HEX, this method returns the size of the BIN content of the file.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the size of the SoftDevice firmware (BIN part)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="bootloaderImageSize--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>bootloaderImageSize</h4>
|
|
<pre>public int bootloaderImageSize()</pre>
|
|
<div class="block">Returns the total size of the Bootloader firmware. In case the firmware was given as a HEX, this method returns the size of the BIN content of the file.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the size of the Bootloader firmware (BIN part)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="applicationImageSize--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>applicationImageSize</h4>
|
|
<pre>public int applicationImageSize()</pre>
|
|
<div class="block">Returns the total size of the Application firmware. In case the firmware was given as a HEX, this method returns the size of the BIN content of the file.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the size of the Application firmware (BIN part)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getSystemInit--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSystemInit</h4>
|
|
<pre>public byte[] getSystemInit()</pre>
|
|
<div class="block">Returns the content of the init file for SoftDevice and/or Bootloader. When both SoftDevice and Bootloader are present in the ZIP file (as two files using the compatibility mode
|
|
or as one file using the new Distribution packet) the system init contains validation data for those two files combined (e.g. the CRC value). This method may return
|
|
<code>null</code> if there is no SoftDevice nor Bootloader in the ZIP or the DAT file is not present there.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the content of the init packet for SoftDevice and/or Bootloader</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getApplicationInit--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getApplicationInit</h4>
|
|
<pre>public byte[] getApplicationInit()</pre>
|
|
<div class="block">Returns the content of the init file for the Application or <code>null</code> if no application file in the ZIP, or the DAT file is not provided.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the content of the init packet for Application</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isSecureDfuRequired--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>isSecureDfuRequired</h4>
|
|
<pre>public boolean isSecureDfuRequired()</pre>
|
|
<div class="block">This method returns true if the content of the ZIP file may be sent only using Secure DFU.
|
|
The reason may be that the ZIP contains a single bin file with SD and/or BL together with App, which has to be sent in a single connection.
|
|
Sizes of each component are not given explicitly in the Manifest (even if they are, they are ignored). They are hidden in the Init Packet instead.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the content of this ZIP may only be sent using Secure DFU.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../../no/nordicsemi/android/dfu/internal/HexInputStream.html" title="class in no.nordicsemi.android.dfu.internal"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?no/nordicsemi/android/dfu/internal/ArchiveInputStream.html" target="_top">Frames</a></li>
|
|
<li><a href="ArchiveInputStream.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#fields.inherited.from.class.java.util.zip.ZipInputStream">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|