📄 audioinputstream.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/AudioInputStream.html#getFrameLength()">getFrameLength</A></B>()</CODE><BR> Obtains the length of the stream, expressed in sample frames rather than bytes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/AudioInputStream.html#mark(int)">mark</A></B>(int readlimit)</CODE><BR> Marks the current position in this audio input stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/AudioInputStream.html#markSupported()">markSupported</A></B>()</CODE><BR> Tests whether this audio input stream supports the <code>mark</code> and <code>reset</code> methods.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/AudioInputStream.html#read()">read</A></B>()</CODE><BR> Reads the next byte of data from the audio input stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/AudioInputStream.html#read(byte[])">read</A></B>(byte[] b)</CODE><BR> Reads some number of bytes from the audio input stream and stores them into the buffer array <code>b</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/AudioInputStream.html#read(byte[], int, int)">read</A></B>(byte[] b, int off, int len)</CODE><BR> Reads up to a specified maximum number of bytes of data from the audio stream, putting them into the given byte array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/AudioInputStream.html#reset()">reset</A></B>()</CODE><BR> Repositions this audio input stream to the position it had at the time its <code>mark</code> method was last invoked.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/AudioInputStream.html#skip(long)">skip</A></B>(long n)</CODE><BR> Skips over and discards a specified number of bytes from this audio input stream.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="format"><!-- --></A><H3>format</H3><PRE>protected <A HREF="../../../javax/sound/sampled/AudioFormat.html">AudioFormat</A> <B>format</B></PRE><DL><DD>The format of the audio data contained in the stream.</DL><HR><A NAME="frameLength"><!-- --></A><H3>frameLength</H3><PRE>protected long <B>frameLength</B></PRE><DL><DD>This stream's length, in sample frames.</DL><HR><A NAME="frameSize"><!-- --></A><H3>frameSize</H3><PRE>protected int <B>frameSize</B></PRE><DL><DD>The size of each frame, in bytes.</DL><HR><A NAME="framePos"><!-- --></A><H3>framePos</H3><PRE>protected long <B>framePos</B></PRE><DL><DD>The current position in this stream, in sample frames (zero-based).</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="AudioInputStream(java.io.InputStream, javax.sound.sampled.AudioFormat, long)"><!-- --></A><H3>AudioInputStream</H3><PRE>public <B>AudioInputStream</B>(<A HREF="../../../java/io/InputStream.html">InputStream</A> stream, <A HREF="../../../javax/sound/sampled/AudioFormat.html">AudioFormat</A> format, long length)</PRE><DL><DD>Constructs an audio input stream that has the requested format and length in sample frames, using audio data from the specified input stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>stream</CODE> - the stream on which this <code>AudioInputStream</code> object is based<DD><CODE>format</CODE> - the format of this stream's audio data<DD><CODE>length</CODE> - the length in sample frames of the data in this stream</DL></DD></DL><HR><A NAME="AudioInputStream(javax.sound.sampled.TargetDataLine)"><!-- --></A><H3>AudioInputStream</H3><PRE>public <B>AudioInputStream</B>(<A HREF="../../../javax/sound/sampled/TargetDataLine.html">TargetDataLine</A> line)</PRE><DL><DD>Constructs an audio input stream that reads its data from the target data line indicated. The format of the stream is the same as that of the target data lin, and the length is AudioSystem#NOT_SPECIFIED.<DD><DL><DT><B>Parameters:</B><DD><CODE>line</CODE> - the target data line from which this stream obtains its data.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioSystem.html#NOT_SPECIFIED"><CODE>AudioSystem.NOT_SPECIFIED</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getFormat()"><!-- --></A><H3>getFormat</H3><PRE>public <A HREF="../../../javax/sound/sampled/AudioFormat.html">AudioFormat</A> <B>getFormat</B>()</PRE><DL><DD>Obtains the audio format of the sound data in this audio input stream.<DD><DL><DT><B>Returns:</B><DD>an audio format object describing this stream's format</DL></DD></DL><HR><A NAME="getFrameLength()"><!-- --></A><H3>getFrameLength</H3><PRE>public long <B>getFrameLength</B>()</PRE><DL><DD>Obtains the length of the stream, expressed in sample frames rather than bytes.<DD><DL><DT><B>Returns:</B><DD>the length in sample frames</DL></DD></DL><HR><A NAME="read()"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>() throws <A HREF="../../../java/io/IOException.html">IOException</A></PRE><DL><DD>Reads the next byte of data from the audio input stream. The audio input stream's frame size must be one byte, or an <code>IOException</code> will be thrown.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/io/InputStream.html#read()">read</A></CODE> in class <CODE><A HREF="../../../java/io/InputStream.html">InputStream</A></CODE></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -