📄 audioinputstream.html
字号:
<DD><DL><DT><B>Returns:</B><DD>the next byte of data, or -1 if the end of the stream is reached<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/io/IOException.html">IOException</A></CODE> - if an input or output error occurs<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioInputStream.html#read(byte[], int, int)"><CODE>read(byte[], int, int)</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#read(byte[])"><CODE>read(byte[])</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#available()"><CODE><p></CODE></A></DL></DD></DL><HR><A NAME="read(byte[])"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>(byte[] b) throws <A HREF="../../../java/io/IOException.html">IOException</A></PRE><DL><DD>Reads some number of bytes from the audio input stream and stores them into the buffer array <code>b</code>. The number of bytes actually read is returned as an integer. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/io/InputStream.html#read(byte[])">read</A></CODE> in class <CODE><A HREF="../../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read<DT><B>Returns:</B><DD>the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/io/IOException.html">IOException</A></CODE> - if an input or output error occurs<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioInputStream.html#read(byte[], int, int)"><CODE>read(byte[], int, int)</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#read()"><CODE>read()</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#available()"><CODE>available()</CODE></A></DL></DD></DL><HR><A NAME="read(byte[], int, int)"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>(byte[] b, int off, int len) throws <A HREF="../../../java/io/IOException.html">IOException</A></PRE><DL><DD>Reads up to a specified maximum number of bytes of data from the audio stream, putting them into the given byte array.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/io/InputStream.html#read(byte[], int, int)">read</A></CODE> in class <CODE><A HREF="../../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read<DD><CODE>off</CODE> - the offset, from the beginning of array <code>b</code>, at which the data will be written<DD><CODE>len</CODE> - the maximum number of bytes to read<DT><B>Returns:</B><DD>the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/io/IOException.html">IOException</A></CODE> - if an input or output error occurs<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioInputStream.html#read(byte[])"><CODE>read(byte[])</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#read()"><CODE>read()</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#skip(long)"><CODE>skip(long)</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#available()"><CODE>available()</CODE></A></DL></DD></DL><HR><A NAME="skip(long)"><!-- --></A><H3>skip</H3><PRE>public long <B>skip</B>(long n) throws <A HREF="../../../java/io/IOException.html">IOException</A></PRE><DL><DD>Skips over and discards a specified number of bytes from this audio input stream.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/io/InputStream.html#skip(long)">skip</A></CODE> in class <CODE><A HREF="../../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the requested number of bytes to be skipped<DT><B>Returns:</B><DD>the actual number of bytes skipped<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/io/IOException.html">IOException</A></CODE> - if an input or output error occurs<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioInputStream.html#read()"><CODE>read()</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#available()"><CODE>available()</CODE></A></DL></DD></DL><HR><A NAME="available()"><!-- --></A><H3>available</H3><PRE>public int <B>available</B>() throws <A HREF="../../../java/io/IOException.html">IOException</A></PRE><DL><DD>Returns the maximum number of bytes that can be read (or skipped over) from this audio input stream without blocking. This limit applies only to the next invocation of a <code>read</code> or <code>skip</code> method for this audio input stream; the limit can vary each time these methods are invoked.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/io/InputStream.html#available()">available</A></CODE> in class <CODE><A HREF="../../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of bytes that can be read from this audio input stream without blocking<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/io/IOException.html">IOException</A></CODE> - if an input or output error occurs<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioInputStream.html#read(byte[], int, int)"><CODE>read(byte[], int, int)</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#read(byte[])"><CODE>read(byte[])</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#read()"><CODE>read()</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#skip(long)"><CODE>skip(long)</CODE></A></DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>() throws <A HREF="../../../java/io/IOException.html">IOException</A></PRE><DL><DD>Closes this audio input stream and releases any system resources associated with the stream.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/io/InputStream.html#close()">close</A></CODE> in class <CODE><A HREF="../../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/io/IOException.html">IOException</A></CODE> - if an input or output error occurs</DL></DD></DL><HR><A NAME="mark(int)"><!-- --></A><H3>mark</H3><PRE>public void <B>mark</B>(int readlimit)</PRE><DL><DD>Marks the current position in this audio input stream.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/io/InputStream.html#mark(int)">mark</A></CODE> in class <CODE><A HREF="../../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>readlimit</CODE> - the maximum number of bytes that can be read before the mark position becomes invalid.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioInputStream.html#reset()"><CODE>reset()</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#markSupported()"><CODE>markSupported()</CODE></A></DL></DD></DL><HR><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>() throws <A HREF="../../../java/io/IOException.html">IOException</A></PRE><DL><DD>Repositions this audio input stream to the position it had at the time its <code>mark</code> method was last invoked.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/io/InputStream.html#reset()">reset</A></CODE> in class <CODE><A HREF="../../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/io/IOException.html">IOException</A></CODE> - if an input or output error occurs.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioInputStream.html#mark(int)"><CODE>mark(int)</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#markSupported()"><CODE>markSupported()</CODE></A></DL></DD></DL><HR><A NAME="markSupported()"><!-- --></A><H3>markSupported</H3><PRE>public boolean <B>markSupported</B>()</PRE><DL><DD>Tests whether this audio input stream supports the <code>mark</code> and <code>reset</code> methods.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/io/InputStream.html#markSupported()">markSupported</A></CODE> in class <CODE><A HREF="../../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD><code>true</code> if this stream supports the <code>mark</code> and <code>reset</code> methods; <code>false</code> otherwise<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioInputStream.html#mark(int)"><CODE>mark(int)</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioInputStream.html#reset()"><CODE>reset()</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AudioInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/sound/sampled/AudioFormat.Encoding.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/sound/sampled/AudioPermission.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="AudioInputStream.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -