731 lines
35 KiB
HTML
731 lines
35 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="nl">
|
|
<head>
|
|
<!-- Generated by javadoc (version 1.7.0_40) on Tue Oct 15 12:25:31 CEST 2013 -->
|
|
<title>Stream</title>
|
|
<meta name="date" content="2013-10-15">
|
|
<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="Stream";
|
|
}
|
|
//-->
|
|
</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/Stream.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-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="../../System/IO/SeekOrigin.html" title="enum in System.IO"><span class="strong">Prev Class</span></a></li>
|
|
<li>Next Class</li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../index.html?System/IO/Stream.html" target="_top">Frames</a></li>
|
|
<li><a href="Stream.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="#field_summary">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><a href="#field_detail">Field</a> | </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">System.IO</div>
|
|
<h2 title="Class Stream" class="title">Class Stream</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>System.IO.Stream</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><a href="../../System/IDisposable.html" title="interface in System">IDisposable</a></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt>Direct Known Subclasses:</dt>
|
|
<dd><a href="../../System/IO/FileStream.html" title="class in System.IO">FileStream</a>, <a href="../../System/IO/MemoryStream.html" title="class in System.IO">MemoryStream</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public abstract class <span class="strong">Stream</span>
|
|
extends java.lang.Object
|
|
implements <a href="../../System/IDisposable.html" title="interface in System">IDisposable</a></pre>
|
|
<div class="block">Provides a generic view of a sequence of bytes.</div>
|
|
<dl><dt><span class="strong">Author:</span></dt>
|
|
<dd>Halofreak1990</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"> </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>static System.IO.NullStream</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Null">Null</a></strong></code>
|
|
<div class="block">A Stream with no backing store.</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"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier</th>
|
|
<th class="colLast" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected </code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Stream()">Stream</a></strong>()</code>
|
|
<div class="block">Initializes a new instance of the System.IO.Stream class.</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"> </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><a href="../../System/IAsyncResult.html" title="interface in System">IAsyncResult</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#BeginRead(byte[], int, int, System.AsyncCallback, java.lang.Object)">BeginRead</a></strong>(byte[] buffer,
|
|
int offset,
|
|
int count,
|
|
<a href="../../System/AsyncCallback.html" title="class in System">AsyncCallback</a> callback,
|
|
java.lang.Object state)</code>
|
|
<div class="block">Begins an asynchronous read operation.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../System/IAsyncResult.html" title="interface in System">IAsyncResult</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#BeginWrite(byte[], int, int, System.AsyncCallback, java.lang.Object)">BeginWrite</a></strong>(byte[] buffer,
|
|
int offset,
|
|
int count,
|
|
<a href="../../System/AsyncCallback.html" title="class in System">AsyncCallback</a> callback,
|
|
java.lang.Object state)</code>
|
|
<div class="block">Begins an asynchronous write operation.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>abstract boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#CanRead()">CanRead</a></strong>()</code>
|
|
<div class="block">When overridden in a derived class, gets a value indicating whether the current stream supports reading.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>abstract boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#CanSeek()">CanSeek</a></strong>()</code>
|
|
<div class="block">When overridden in a derived class, gets a value indicating whether the current stream supports seeking.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#CanTimeout()">CanTimeout</a></strong>()</code>
|
|
<div class="block">Gets a value that determines whether the current stream can time out.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>abstract boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#CanWrite()">CanWrite</a></strong>()</code>
|
|
<div class="block">When overridden in a derived class, gets a value indicating whether the current stream supports writing.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Close()">Close</a></strong>()</code>
|
|
<div class="block">Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Dispose()">Dispose</a></strong>()</code>
|
|
<div class="block">Releases all resources used by the System.IO.Stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Dispose(boolean)">Dispose</a></strong>(boolean disposing)</code>
|
|
<div class="block">Releases the unmanaged resources used by the System.IO.Stream and optionally releases the managed resources.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#EndRead(System.IAsyncResult)">EndRead</a></strong>(<a href="../../System/IAsyncResult.html" title="interface in System">IAsyncResult</a> asyncResult)</code>
|
|
<div class="block">Waits for the pending asynchronous read to complete.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#EndWrite(System.IAsyncResult)">EndWrite</a></strong>(<a href="../../System/IAsyncResult.html" title="interface in System">IAsyncResult</a> asyncResult)</code>
|
|
<div class="block">Ends an asynchronous write operation.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>abstract void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Flush()">Flush</a></strong>()</code>
|
|
<div class="block">When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>abstract long</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#getPosition()">getPosition</a></strong>()</code>
|
|
<div class="block">When overridden in a derived class, gets the position within the current stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>abstract long</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Length()">Length</a></strong>()</code>
|
|
<div class="block">When overridden in a derived class, gets the length in bytes of the stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>abstract int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Read(byte[], int, int)">Read</a></strong>(byte[] buffer,
|
|
int offset,
|
|
int count)</code>
|
|
<div class="block">When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#ReadByte()">ReadByte</a></strong>()</code>
|
|
<div class="block">Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>abstract long</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Seek(long, System.IO.SeekOrigin)">Seek</a></strong>(long offset,
|
|
<a href="../../System/IO/SeekOrigin.html" title="enum in System.IO">SeekOrigin</a> origin)</code>
|
|
<div class="block">When overridden in a derived class, sets the position within the current stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>abstract void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#SetLength(long)">SetLength</a></strong>(long value)</code>
|
|
<div class="block">When overridden in a derived class, sets the length of the current stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>abstract void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#setPosition(long)">setPosition</a></strong>(long value)</code>
|
|
<div class="block">When overridden in a derived class, sets the position within the current stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>abstract void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#Write(byte[], int, int)">Write</a></strong>(byte[] buffer,
|
|
int offset,
|
|
int count)</code>
|
|
<div class="block">When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../System/IO/Stream.html#WriteByte(byte)">WriteByte</a></strong>(byte value)</code>
|
|
<div class="block">Writes a byte to the current position in the stream and advances the position within the stream by one byte.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<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">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="Null">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Null</h4>
|
|
<pre>public static final System.IO.NullStream Null</pre>
|
|
<div class="block">A Stream with no backing store.</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="Stream()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Stream</h4>
|
|
<pre>protected Stream()</pre>
|
|
<div class="block">Initializes a new instance of the System.IO.Stream class.</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="CanRead()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CanRead</h4>
|
|
<pre>public abstract boolean CanRead()</pre>
|
|
<div class="block">When overridden in a derived class, gets a value indicating whether the current stream supports reading.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the stream supports reading; otherwise, false.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="CanSeek()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CanSeek</h4>
|
|
<pre>public abstract boolean CanSeek()</pre>
|
|
<div class="block">When overridden in a derived class, gets a value indicating whether the current stream supports seeking.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the stream supports seeking; otherwise, false.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="CanTimeout()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CanTimeout</h4>
|
|
<pre>public boolean CanTimeout()</pre>
|
|
<div class="block">Gets a value that determines whether the current stream can time out.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>A value that determines whether the current stream can time out.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="CanWrite()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CanWrite</h4>
|
|
<pre>public abstract boolean CanWrite()</pre>
|
|
<div class="block">When overridden in a derived class, gets a value indicating whether the current stream supports writing.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the stream supports writing; otherwise, false.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Length()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Length</h4>
|
|
<pre>public abstract long Length()</pre>
|
|
<div class="block">When overridden in a derived class, gets the length in bytes of the stream.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>A long value representing the length of the stream in bytes.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/NotSupportedException.html" title="class in System">NotSupportedException</a></code> - A class derived from Stream does not support seeking.</dd>
|
|
<dd><code><a href="../../System/ObjectDisposedException.html" title="class in System">ObjectDisposedException</a></code> - Methods were called after the stream was closed.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPosition()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPosition</h4>
|
|
<pre>public abstract long getPosition()</pre>
|
|
<div class="block">When overridden in a derived class, gets the position within the current stream.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>The current position within the stream.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setPosition(long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setPosition</h4>
|
|
<pre>public abstract void setPosition(long value)</pre>
|
|
<div class="block">When overridden in a derived class, sets the position within the current stream.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - The new position within the stream.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="BeginRead(byte[], int, int, System.AsyncCallback, java.lang.Object)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>BeginRead</h4>
|
|
<pre>public <a href="../../System/IAsyncResult.html" title="interface in System">IAsyncResult</a> BeginRead(byte[] buffer,
|
|
int offset,
|
|
int count,
|
|
<a href="../../System/AsyncCallback.html" title="class in System">AsyncCallback</a> callback,
|
|
java.lang.Object state)</pre>
|
|
<div class="block">Begins an asynchronous read operation.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - The buffer to read the data into.</dd><dd><code>offset</code> - The byte offset in buffer at which to begin writing data read from the stream.</dd><dd><code>count</code> - The maximum number of bytes to read.</dd><dd><code>callback</code> - An optional asynchronous callback, to be called when the read is complete.</dd><dd><code>state</code> - A user-provided object that distinguishes this particular asynchronous read request from other requests.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>An System.IAsyncResult that represents the asynchronous read, which could still be pending.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/IO/IOException.html" title="class in System.IO">IOException</a></code> - Attempted an asynchronous read past the end of the stream, or a disk error occurs.</dd>
|
|
<dd><code><a href="../../System/ArgumentException.html" title="class in System">ArgumentException</a></code> - One or more of the arguments is invalid.</dd>
|
|
<dd><code><a href="../../System/ObjectDisposedException.html" title="class in System">ObjectDisposedException</a></code> - Methods were called after the stream was closed.</dd>
|
|
<dd><code><a href="../../System/NotSupportedException.html" title="class in System">NotSupportedException</a></code> - The current Stream implementation does not support the read operation.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="BeginWrite(byte[], int, int, System.AsyncCallback, java.lang.Object)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>BeginWrite</h4>
|
|
<pre>public <a href="../../System/IAsyncResult.html" title="interface in System">IAsyncResult</a> BeginWrite(byte[] buffer,
|
|
int offset,
|
|
int count,
|
|
<a href="../../System/AsyncCallback.html" title="class in System">AsyncCallback</a> callback,
|
|
java.lang.Object state)</pre>
|
|
<div class="block">Begins an asynchronous write operation.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - The buffer to write data from.</dd><dd><code>offset</code> - The byte offset in buffer from which to begin writing.</dd><dd><code>count</code> - The maximum number of bytes to write.</dd><dd><code>callback</code> - An optional asynchronous callback, to be called when the write is complete.</dd><dd><code>state</code> - A user-provided object that distinguishes this particular asynchronous write request from other requests.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>An IAsyncResult that represents the asynchronous write, which could still be pending.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/IO/IOException.html" title="class in System.IO">IOException</a></code> - Attempted an asynchronous write past the end of the stream, or a disk error occurs.</dd>
|
|
<dd><code><a href="../../System/ArgumentException.html" title="class in System">ArgumentException</a></code> - One or more of the arguments is invalid.</dd>
|
|
<dd><code><a href="../../System/ObjectDisposedException.html" title="class in System">ObjectDisposedException</a></code> - Methods were called after the stream was closed.</dd>
|
|
<dd><code><a href="../../System/NotSupportedException.html" title="class in System">NotSupportedException</a></code> - The current Stream implementation does not support the write operation.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Close()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Close</h4>
|
|
<pre>public void Close()</pre>
|
|
<div class="block">Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="Dispose()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Dispose</h4>
|
|
<pre>public void Dispose()</pre>
|
|
<div class="block">Releases all resources used by the System.IO.Stream.</div>
|
|
<dl>
|
|
<dt><strong>Specified by:</strong></dt>
|
|
<dd><code><a href="../../System/IDisposable.html#Dispose()">Dispose</a></code> in interface <code><a href="../../System/IDisposable.html" title="interface in System">IDisposable</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Dispose(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Dispose</h4>
|
|
<pre>protected void Dispose(boolean disposing)</pre>
|
|
<div class="block">Releases the unmanaged resources used by the System.IO.Stream and optionally releases the managed resources.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>disposing</code> - true to release both managed and unmanaged resources; false to release only unmanaged resources.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EndRead(System.IAsyncResult)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EndRead</h4>
|
|
<pre>public int EndRead(<a href="../../System/IAsyncResult.html" title="interface in System">IAsyncResult</a> asyncResult)</pre>
|
|
<div class="block">Waits for the pending asynchronous read to complete.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>asyncResult</code> - The reference to the pending asynchronous request to finish.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The number of bytes read from the stream, between zero (0) and the number of bytes you requested.
|
|
Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is
|
|
available.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EndWrite(System.IAsyncResult)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EndWrite</h4>
|
|
<pre>public void EndWrite(<a href="../../System/IAsyncResult.html" title="interface in System">IAsyncResult</a> asyncResult)</pre>
|
|
<div class="block">Ends an asynchronous write operation.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>asyncResult</code> - The reference to the pending asynchronous request to finish.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/ArgumentNullException.html" title="class in System">ArgumentNullException</a></code> - asyncResult is null.</dd>
|
|
<dd><code><a href="../../System/ArgumentException.html" title="class in System">ArgumentException</a></code> - asyncResult did not originate from a System.IO.Stream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object) method on the current stream.</dd>
|
|
<dd><code><a href="../../System/IO/IOException.html" title="class in System.IO">IOException</a></code> - The stream is closed or an internal error has occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Flush()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Flush</h4>
|
|
<pre>public abstract void Flush()</pre>
|
|
<div class="block">When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.</div>
|
|
<dl><dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/IO/IOException.html" title="class in System.IO">IOException</a></code> - An I/O error occurs.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Read(byte[], int, int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Read</h4>
|
|
<pre>public abstract int Read(byte[] buffer,
|
|
int offset,
|
|
int count)</pre>
|
|
<div class="block">When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.</dd><dd><code>offset</code> - The zero-based byte offset in buffer at which to begin storing the data read from the current stream.</dd><dd><code>count</code> - The maximum number of bytes to be read from the current stream.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/ArgumentException.html" title="class in System">ArgumentException</a></code> - The sum of offset and count is larger than the buffer length.</dd>
|
|
<dd><code><a href="../../System/ArgumentNullException.html" title="class in System">ArgumentNullException</a></code> - buffer is null.</dd>
|
|
<dd><code><a href="../../System/ArgumentOutOfRangeException.html" title="class in System">ArgumentOutOfRangeException</a></code> - offset or count is negative.</dd>
|
|
<dd><code><a href="../../System/IO/IOException.html" title="class in System.IO">IOException</a></code> - An I/O error occurs.</dd>
|
|
<dd><code><a href="../../System/NotSupportedException.html" title="class in System">NotSupportedException</a></code> - The stream does not support reading.</dd>
|
|
<dd><code><a href="../../System/ObjectDisposedException.html" title="class in System">ObjectDisposedException</a></code> - Methods were called after the stream was closed.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ReadByte()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ReadByte</h4>
|
|
<pre>public int ReadByte()</pre>
|
|
<div class="block">Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>The unsigned byte cast to an Int32, or -1 if at the end of the stream.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/NotSupportedException.html" title="class in System">NotSupportedException</a></code> - The stream does not support reading.</dd>
|
|
<dd><code><a href="../../System/ObjectDisposedException.html" title="class in System">ObjectDisposedException</a></code> - Methods were called after the stream was closed.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Seek(long, System.IO.SeekOrigin)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Seek</h4>
|
|
<pre>public abstract long Seek(long offset,
|
|
<a href="../../System/IO/SeekOrigin.html" title="enum in System.IO">SeekOrigin</a> origin)</pre>
|
|
<div class="block">When overridden in a derived class, sets the position within the current stream.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>offset</code> - A byte offset relative to the origin parameter.</dd><dd><code>origin</code> - A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The new position within the current stream.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/IO/IOException.html" title="class in System.IO">IOException</a></code> - An I/O error occurs.</dd>
|
|
<dd><code><a href="../../System/NotSupportedException.html" title="class in System">NotSupportedException</a></code> - The stream does not support seeking, such as if the stream is constructed from a pipe or console output.</dd>
|
|
<dd><code><a href="../../System/ObjectDisposedException.html" title="class in System">ObjectDisposedException</a></code> - Methods were called after the stream was closed.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="SetLength(long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SetLength</h4>
|
|
<pre>public abstract void SetLength(long value)</pre>
|
|
<div class="block">When overridden in a derived class, sets the length of the current stream.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - The desired length of the current stream in bytes.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/IO/IOException.html" title="class in System.IO">IOException</a></code> - An I/O error occurs.</dd>
|
|
<dd><code><a href="../../System/NotSupportedException.html" title="class in System">NotSupportedException</a></code> - The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output.</dd>
|
|
<dd><code><a href="../../System/ObjectDisposedException.html" title="class in System">ObjectDisposedException</a></code> - Methods were called after the stream was closed.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Write(byte[], int, int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Write</h4>
|
|
<pre>public abstract void Write(byte[] buffer,
|
|
int offset,
|
|
int count)</pre>
|
|
<div class="block">When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - An array of bytes. This method copies count bytes from buffer to the current stream.</dd><dd><code>offset</code> - The zero-based byte offset in buffer at which to begin copying bytes to the current stream.</dd><dd><code>count</code> - The number of bytes to be written to the current stream.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="WriteByte(byte)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>WriteByte</h4>
|
|
<pre>public void WriteByte(byte value)</pre>
|
|
<div class="block">Writes a byte to the current position in the stream and advances the position within the stream by one byte.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - The byte to write to the stream.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../System/IO/IOException.html" title="class in System.IO">IOException</a></code> - An I/O error occurs.</dd>
|
|
<dd><code><a href="../../System/NotSupportedException.html" title="class in System">NotSupportedException</a></code> - The stream does not support writing, or the stream is already closed.</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/Stream.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-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="../../System/IO/SeekOrigin.html" title="enum in System.IO"><span class="strong">Prev Class</span></a></li>
|
|
<li>Next Class</li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../index.html?System/IO/Stream.html" target="_top">Frames</a></li>
|
|
<li><a href="Stream.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="#field_summary">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><a href="#field_detail">Field</a> | </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>
|