You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

575 lines
31 KiB

<!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 (version 1.7.0_80) on Wed Nov 30 19:45:04 CET 2022 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EofSensorInputStream (Apache HttpComponents Client 4.5.14 API)</title>
<meta name="date" content="2022-11-30">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="EofSensorInputStream (Apache HttpComponents Client 4.5.14 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="class-use/EofSensorInputStream.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/http/conn/DnsResolver.html" title="interface in org.apache.http.conn"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/http/conn/EofSensorWatcher.html" title="interface in org.apache.http.conn"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/http/conn/EofSensorInputStream.html" target="_top">Frames</a></li>
<li><a href="EofSensorInputStream.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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">org.apache.http.conn</div>
<h2 title="Class EofSensorInputStream" class="title">Class EofSensorInputStream</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</a></li>
<li>
<ul class="inheritance">
<li>org.apache.http.conn.EofSensorInputStream</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a>, <a href="../../../../org/apache/http/conn/ConnectionReleaseTrigger.html" title="interface in org.apache.http.conn">ConnectionReleaseTrigger</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">EofSensorInputStream</span>
extends <a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>
implements <a href="../../../../org/apache/http/conn/ConnectionReleaseTrigger.html" title="interface in org.apache.http.conn">ConnectionReleaseTrigger</a></pre>
<div class="block">A stream wrapper that triggers actions on <a href="../../../../org/apache/http/conn/EofSensorInputStream.html#close()"><code>close()</code></a> and EOF.
Primarily used to auto-release an underlying managed connection when the response
body is consumed or no longer needed.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>4.0</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/http/conn/EofSensorWatcher.html" title="interface in org.apache.http.conn"><code>EofSensorWatcher</code></a></dd></dl>
</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>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#wrappedStream">wrappedStream</a></strong></code>
<div class="block">The wrapped input stream, while accessible.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#EofSensorInputStream(java.io.InputStream,%20org.apache.http.conn.EofSensorWatcher)">EofSensorInputStream</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;in,
<a href="../../../../org/apache/http/conn/EofSensorWatcher.html" title="interface in org.apache.http.conn">EofSensorWatcher</a>&nbsp;watcher)</code>
<div class="block">Creates a new EOF sensor.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#abortConnection()">abortConnection</a></strong>()</code>
<div class="block">Aborts this stream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#available()">available</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#checkAbort()">checkAbort</a></strong>()</code>
<div class="block">Detects stream abort and notifies the watcher.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#checkClose()">checkClose</a></strong>()</code>
<div class="block">Detects stream close and notifies the watcher.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#checkEOF(int)">checkEOF</a></strong>(int&nbsp;eof)</code>
<div class="block">Detects EOF and notifies the watcher.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#close()">close</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#isReadAllowed()">isReadAllowed</a></strong>()</code>
<div class="block">Checks whether the underlying stream can be read from.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#read()">read</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#read(byte[])">read</a></strong>(byte[]&nbsp;b)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#read(byte[],%20int,%20int)">read</a></strong>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/http/conn/EofSensorInputStream.html#releaseConnection()">releaseConnection</a></strong>()</code>
<div class="block">Same as <a href="../../../../org/apache/http/conn/EofSensorInputStream.html#close()"><code>close()</code></a>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.io.InputStream">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.io.<a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></h3>
<code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#mark(int)" title="class or interface in java.io">mark</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#markSupported()" title="class or interface in java.io">markSupported</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#reset()" title="class or interface in java.io">reset</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#skip(long)" title="class or interface in java.io">skip</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="wrappedStream">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>wrappedStream</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> wrappedStream</pre>
<div class="block">The wrapped input stream, while accessible.
The value changes to <code>null</code> when the wrapped stream
becomes inaccessible.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="EofSensorInputStream(java.io.InputStream, org.apache.http.conn.EofSensorWatcher)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>EofSensorInputStream</h4>
<pre>public&nbsp;EofSensorInputStream(<a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;in,
<a href="../../../../org/apache/http/conn/EofSensorWatcher.html" title="interface in org.apache.http.conn">EofSensorWatcher</a>&nbsp;watcher)</pre>
<div class="block">Creates a new EOF sensor.
If no watcher is passed, the underlying stream will simply be
closed when EOF is detected or <a href="../../../../org/apache/http/conn/EofSensorInputStream.html#close()"><code>close</code></a> is called.
Otherwise, the watcher decides whether the underlying stream
should be closed before detaching from it.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>in</code> - the wrapped stream</dd><dd><code>watcher</code> - the watcher for events, or <code>null</code> for
auto-close behavior without notification</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="isReadAllowed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReadAllowed</h4>
<pre>protected&nbsp;boolean&nbsp;isReadAllowed()
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Checks whether the underlying stream can be read from.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the underlying stream is accessible,
<code>false</code> if this stream is in EOF mode and
detached from the underlying stream</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if this stream is already closed</dd></dl>
</li>
</ul>
<a name="read()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read()
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#read()" title="class or interface in java.io">read</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="read(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#read(byte[],%20int,%20int)" title="class or interface in java.io">read</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="read(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read(byte[]&nbsp;b)
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#read(byte[])" title="class or interface in java.io">read</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="available()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>available</h4>
<pre>public&nbsp;int&nbsp;available()
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#available()" title="class or interface in java.io">available</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#close()" title="class or interface in java.io">close</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="checkEOF(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkEOF</h4>
<pre>protected&nbsp;void&nbsp;checkEOF(int&nbsp;eof)
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Detects EOF and notifies the watcher.
This method should only be called while the underlying stream is
still accessible. Use <a href="../../../../org/apache/http/conn/EofSensorInputStream.html#isReadAllowed()"><code>isReadAllowed</code></a> to
check that condition.
<p>
If EOF is detected, the watcher will be notified and this stream
is detached from the underlying stream. This prevents multiple
notifications from this stream.
</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>eof</code> - the result of the calling read operation.
A negative value indicates that EOF is reached.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an IO problem on closing the underlying stream</dd></dl>
</li>
</ul>
<a name="checkClose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkClose</h4>
<pre>protected&nbsp;void&nbsp;checkClose()
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Detects stream close and notifies the watcher.
There's not much to detect since this is called by <a href="../../../../org/apache/http/conn/EofSensorInputStream.html#close()"><code>close</code></a>.
The watcher will only be notified if this stream is closed
for the first time and before EOF has been detected.
This stream will be detached from the underlying stream to prevent
multiple notifications to the watcher.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an IO problem on closing the underlying stream</dd></dl>
</li>
</ul>
<a name="checkAbort()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkAbort</h4>
<pre>protected&nbsp;void&nbsp;checkAbort()
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Detects stream abort and notifies the watcher.
There's not much to detect since this is called by
<a href="../../../../org/apache/http/conn/EofSensorInputStream.html#abortConnection()"><code>abortConnection</code></a>.
The watcher will only be notified if this stream is aborted
for the first time and before EOF has been detected or the
stream has been <a href="../../../../org/apache/http/conn/EofSensorInputStream.html#close()"><code>closed</code></a> gracefully.
This stream will be detached from the underlying stream to prevent
multiple notifications to the watcher.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an IO problem on closing the underlying stream</dd></dl>
</li>
</ul>
<a name="releaseConnection()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>releaseConnection</h4>
<pre>public&nbsp;void&nbsp;releaseConnection()
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Same as <a href="../../../../org/apache/http/conn/EofSensorInputStream.html#close()"><code>close()</code></a>.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/http/conn/ConnectionReleaseTrigger.html#releaseConnection()">releaseConnection</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/http/conn/ConnectionReleaseTrigger.html" title="interface in org.apache.http.conn">ConnectionReleaseTrigger</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an IO problem. The connection will be released
anyway.</dd></dl>
</li>
</ul>
<a name="abortConnection()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>abortConnection</h4>
<pre>public&nbsp;void&nbsp;abortConnection()
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Aborts this stream.
This is a special version of <a href="../../../../org/apache/http/conn/EofSensorInputStream.html#close()"><code>close()</code></a> which prevents
re-use of the underlying connection, if any. Calling this method
indicates that there should be no attempt to read until the end of
the stream.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/http/conn/ConnectionReleaseTrigger.html#abortConnection()">abortConnection</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/http/conn/ConnectionReleaseTrigger.html" title="interface in org.apache.http.conn">ConnectionReleaseTrigger</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an IO problem.
The connection will be released anyway.</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="class-use/EofSensorInputStream.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/http/conn/DnsResolver.html" title="interface in org.apache.http.conn"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/http/conn/EofSensorWatcher.html" title="interface in org.apache.http.conn"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/http/conn/EofSensorInputStream.html" target="_top">Frames</a></li>
<li><a href="EofSensorInputStream.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 1999&#x2013;2022 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>