calmnetlib/JavaDoc/com/captainalm/lib/calmnet/stream/NetworkInputStream.html

680 lines
26 KiB
HTML
Raw Permalink Normal View History

2023-05-23 15:24:10 +01:00
<!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_262) on Sun Jun 11 02:31:49 BST 2023 -->
2023-05-23 15:24:10 +01:00
<title>NetworkInputStream</title>
<meta name="date" content="2023-06-11">
2023-05-23 15:24:10 +01:00
<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="NetworkInputStream";
}
}
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};
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><a href="../../../../../com/captainalm/lib/calmnet/stream/LengthClampedInputStream.html" title="class in com.captainalm.lib.calmnet.stream"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html" title="class in com.captainalm.lib.calmnet.stream"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/captainalm/lib/calmnet/stream/NetworkInputStream.html" target="_top">Frames</a></li>
<li><a href="NetworkInputStream.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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>Field&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>Field&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">com.captainalm.lib.calmnet.stream</div>
<h2 title="Class NetworkInputStream" class="title">Class NetworkInputStream</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>com.captainalm.lib.calmnet.stream.NetworkInputStream</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">NetworkInputStream</span>
extends java.io.InputStream</pre>
<div class="block">This class provides a Network Input stream for either <code>Socket</code>s or <code>DatagramSocket</code>s.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Captain ALM</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== 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">&nbsp;</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="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#NetworkInputStream-java.net.DatagramSocket-">NetworkInputStream</a></span>(java.net.DatagramSocket&nbsp;socketIn)</code>
<div class="block">Constructs a new NetworkInputStream with the specified <code>DatagramSocket</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#NetworkInputStream-java.net.Socket-">NetworkInputStream</a></span>(java.net.Socket&nbsp;socketIn)</code>
<div class="block">Constructs a new NetworkInputStream with the specified <code>Socket</code>.</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#available--">available</a></span>()</code>
<div class="block">Returns an estimate of the number of bytes that can be read (or
skipped over) from this input stream without blocking by the next
invocation of a method for this input stream.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#close--">close</a></span>()</code>
<div class="block">Closes this input stream and releases any system resources associated
with the stream.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.net.InetAddress</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#getAddress--">getAddress</a></span>()</code>
<div class="block">Gets the current <code>InetAddress</code> of the stream.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.net.DatagramSocket</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#getDatagramSocket--">getDatagramSocket</a></span>()</code>
<div class="block">Gets the datagram socket in use or null.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.net.InetAddress</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#getLocalAddress--">getLocalAddress</a></span>()</code>
<div class="block">Gets the local <code>InetAddress</code> of the stream.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.lang.Integer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#getLocalPort--">getLocalPort</a></span>()</code>
<div class="block">Gets the local port of the stream.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#getPacketSize--">getPacketSize</a></span>()</code>
<div class="block">Gets the current datagram packet size.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.lang.Integer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#getPort--">getPort</a></span>()</code>
<div class="block">Gets the current port of the stream.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.net.Socket</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#getSocket--">getSocket</a></span>()</code>
<div class="block">Gets the socket in use or null.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#read--">read</a></span>()</code>
<div class="block">Reads the next byte of data from the input stream.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#readPacket--">readPacket</a></span>()</code>
<div class="block">Reads a single datagram packet.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#readPacket-byte:A-">readPacket</a></span>(byte[]&nbsp;b)</code>
<div class="block">Reads a single datagram packet into the specified buffer storing with no offset.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#readPacket-byte:A-int-int-">readPacket</a></span>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">Reads a single datagram packet into the specified buffer
storing from the specified offset and the specified number of bytes.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#setDatagramSocket-java.net.DatagramSocket-">setDatagramSocket</a></span>(java.net.DatagramSocket&nbsp;socketIn)</code>
<div class="block">Sets the datagram socket in use.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html#setSocket-java.net.Socket-">setSocket</a></span>(java.net.Socket&nbsp;socketIn)</code>
<div class="block">Sets the socket in use.</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.InputStream</h3>
<code>mark, markSupported, read, read, reset, skip</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.Object</h3>
<code>equals, 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="NetworkInputStream-java.net.Socket-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NetworkInputStream</h4>
<pre>public&nbsp;NetworkInputStream(java.net.Socket&nbsp;socketIn)</pre>
<div class="block">Constructs a new NetworkInputStream with the specified <code>Socket</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>socketIn</code> - The socket to use.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - socketIn is null.</dd>
</dl>
</li>
</ul>
<a name="NetworkInputStream-java.net.DatagramSocket-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>NetworkInputStream</h4>
<pre>public&nbsp;NetworkInputStream(java.net.DatagramSocket&nbsp;socketIn)</pre>
<div class="block">Constructs a new NetworkInputStream with the specified <code>DatagramSocket</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>socketIn</code> - The datagram socket to use.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - socketIn is null.</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="read--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read()
throws java.io.IOException</pre>
<div class="block">Reads the next byte of data from the input stream. The value byte is
returned as an <code>int</code> in the range <code>0</code> to
<code>255</code>. If no byte is available because the end of the stream
has been reached, the value <code>-1</code> is returned. This method
blocks until input data is available, the end of the stream is detected,
or an exception is thrown.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>read</code>&nbsp;in class&nbsp;<code>java.io.InputStream</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next byte of data, or <code>-1</code> if the end of the
stream is reached.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurs.</dd>
</dl>
</li>
</ul>
<a name="readPacket--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readPacket</h4>
<pre>public&nbsp;byte[]&nbsp;readPacket()
throws java.io.IOException</pre>
<div class="block">Reads a single datagram packet.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A byte array of the single datagram packet.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurs, stream closed or not using a datagram socket.</dd>
</dl>
</li>
</ul>
<a name="readPacket-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readPacket</h4>
<pre>public&nbsp;int&nbsp;readPacket(byte[]&nbsp;b)
throws java.io.IOException</pre>
<div class="block">Reads a single datagram packet into the specified buffer storing with no offset.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - The buffer to store the packet in.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of bytes stored or -1 for end of stream.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - b is null.</dd>
<dd><code>java.io.IOException</code> - if an I/O error occurs, stream closed or not using a datagram socket.</dd>
</dl>
</li>
</ul>
<a name="readPacket-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readPacket</h4>
<pre>public&nbsp;int&nbsp;readPacket(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)
throws java.io.IOException</pre>
<div class="block">Reads a single datagram packet into the specified buffer
storing from the specified offset and the specified number of bytes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - The buffer to store the packet in.</dd>
<dd><code>off</code> - The offset to store in the buffer from.</dd>
<dd><code>len</code> - The number of bytes to store in the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of bytes stored or -1 for end of stream.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - b is null.</dd>
<dd><code>java.lang.IndexOutOfBoundsException</code> - if off is negative, len is negative, or len is greater than the difference of the length of the buffer and off.</dd>
<dd><code>java.io.IOException</code> - if an I/O error occurs, stream closed or not using a datagram socket.</dd>
</dl>
</li>
</ul>
<a name="getPacketSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPacketSize</h4>
<pre>public&nbsp;int&nbsp;getPacketSize()
throws java.io.IOException</pre>
<div class="block">Gets the current datagram packet size.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The datagram packet size.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - stream closed or not using a datagram socket.</dd>
</dl>
</li>
</ul>
<a name="getAddress--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAddress</h4>
<pre>public&nbsp;java.net.InetAddress&nbsp;getAddress()</pre>
<div class="block">Gets the current <code>InetAddress</code> of the stream.
Can be null.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The address.</dd>
</dl>
</li>
</ul>
<a name="getPort--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPort</h4>
<pre>public&nbsp;java.lang.Integer&nbsp;getPort()</pre>
<div class="block">Gets the current port of the stream.
Can be -1.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The current port.</dd>
</dl>
</li>
</ul>
<a name="getLocalAddress--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalAddress</h4>
<pre>public&nbsp;java.net.InetAddress&nbsp;getLocalAddress()</pre>
<div class="block">Gets the local <code>InetAddress</code> of the stream.
Can be null.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The local address.</dd>
</dl>
</li>
</ul>
<a name="getLocalPort--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalPort</h4>
<pre>public&nbsp;java.lang.Integer&nbsp;getLocalPort()</pre>
<div class="block">Gets the local port of the stream.
Can be -1.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The local port.</dd>
</dl>
</li>
</ul>
<a name="getSocket--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSocket</h4>
<pre>public&nbsp;java.net.Socket&nbsp;getSocket()</pre>
<div class="block">Gets the socket in use or null.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The socket in use or null.</dd>
</dl>
</li>
</ul>
<a name="setSocket-java.net.Socket-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSocket</h4>
<pre>public&nbsp;void&nbsp;setSocket(java.net.Socket&nbsp;socketIn)
throws java.io.IOException</pre>
<div class="block">Sets the socket in use.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>socketIn</code> - The socket to now use.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - socketIn is null.</dd>
<dd><code>java.io.IOException</code> - stream closed or not using a socket.</dd>
</dl>
</li>
</ul>
<a name="getDatagramSocket--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDatagramSocket</h4>
<pre>public&nbsp;java.net.DatagramSocket&nbsp;getDatagramSocket()</pre>
<div class="block">Gets the datagram socket in use or null.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The datagram socket in use or null.</dd>
</dl>
</li>
</ul>
<a name="setDatagramSocket-java.net.DatagramSocket-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDatagramSocket</h4>
<pre>public&nbsp;void&nbsp;setDatagramSocket(java.net.DatagramSocket&nbsp;socketIn)
throws java.io.IOException</pre>
<div class="block">Sets the datagram socket in use.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>socketIn</code> - The datagram socket to now use.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - socketIn is null.</dd>
<dd><code>java.io.IOException</code> - stream closed or not using a datagram socket.</dd>
</dl>
</li>
</ul>
<a name="available--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>available</h4>
<pre>public&nbsp;int&nbsp;available()
throws java.io.IOException</pre>
<div class="block">Returns an estimate of the number of bytes that can be read (or
skipped over) from this input stream without blocking by the next
invocation of a method for this input stream. The next invocation
might be the same thread or another thread. A single read or skip of this
many bytes will not block, but may read or skip fewer bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>available</code>&nbsp;in class&nbsp;<code>java.io.InputStream</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an estimate of the number of bytes that can be read (or skipped
over) from this input stream without blocking or <code>0</code> when
it reaches the end of the input stream.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurs.</dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()
throws java.io.IOException</pre>
<div class="block">Closes this input stream and releases any system resources associated
with the stream. The underlying socket is closed.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>close</code>&nbsp;in class&nbsp;<code>java.io.InputStream</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurs.</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><a href="../../../../../com/captainalm/lib/calmnet/stream/LengthClampedInputStream.html" title="class in com.captainalm.lib.calmnet.stream"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html" title="class in com.captainalm.lib.calmnet.stream"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/captainalm/lib/calmnet/stream/NetworkInputStream.html" target="_top">Frames</a></li>
<li><a href="NetworkInputStream.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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>Field&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>Field&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 ======= -->
</body>
</html>