javax.sound.sampled
public class AudioInputStream extends InputStream
Since: 1.3
| Field Summary | |
|---|---|
| protected AudioFormat | format The format of the audio stream. |
| protected long | frameLength The length of the audio stream in frames. |
| protected long | framePos The current frame position, starting from frame zero. |
| protected int | frameSize The size of a frame in bytes. |
| Constructor Summary | |
|---|---|
| AudioInputStream(InputStream is, AudioFormat fmt, long length)
Create a new AudioInputStream given an underlying InputStream,
the audio format, and the length of the data in frames. | |
| AudioInputStream(TargetDataLine line)
Create a new AudioInputStream given a TargetDataLine. | |
| Method Summary | |
|---|---|
| int | available()
Return the number of bytes available to be read from the
underlying stream. |
| void | close()
Close the stream. |
| AudioFormat | getFormat()
Get the format associated with this stream. |
| long | getFrameLength()
Get the length of this stream in frames. |
| void | mark(int limit) |
| boolean | markSupported()
Return true if the underlying stream supports mark and reset,
false otherwise. |
| int | read()
Read a single byte from the underlying stream. |
| int | read(byte[] buf) |
| int | read(byte[] buf, int offset, int length) |
| void | reset() |
| long | skip(long n) |
Parameters: is the underlying input stream fmt the format of the data length the length of the data in frames
Parameters: line the TargetDataLine
Returns: the AudioFormat
Returns: the length of the stream in frames