|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.tuneology.avm.media.AudioData
This class presents an audio file or stream as a pure data stream, stripping off the header, and making its information available in a format-independent manner.
| Constructor Summary | |
AudioData(AudioProperties p,
MediaData f)
Create a new file with the desired properties. |
|
AudioData(MediaData f)
Reads an existing file. |
|
| Method Summary | |
boolean |
canSeek()
Returns true if the file is capable of seeking. |
void |
close()
|
java.io.File |
getFile()
Returns a File object by which the contents can be read. |
long |
getFilePointer()
Returns the current position in the file. |
java.lang.String |
getPath()
Returns the pathname of the file if it has one, blank otherwise. |
MediaProperties |
getProperties()
|
boolean |
isStream()
Returns true if the source is a stream of indefinate length. |
long |
length()
Returns the length of the file. |
int |
read(byte[] b,
int off,
int len)
Returns raw data from the source, skipping over the header. |
void |
releaseFile(java.io.File f)
Deletes the contents of the file if it's a temp file. |
void |
seek(long pos)
Moves the current position in the file. |
void |
setLength(long newLength)
|
void |
write(byte[] b,
int off,
int len)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AudioData(MediaData f)
throws java.io.IOException
public AudioData(AudioProperties p,
MediaData f)
throws java.io.IOException
| Method Detail |
public MediaProperties getProperties()
getProperties in interface MediaData
public java.io.File getFile()
throws java.io.IOException
getFile in interface MediaDatajava.io.IOException - public java.lang.String getPath()
MediaDatagetPath in interface MediaDatacom.tuneology.avm.media.MediaData
public void releaseFile(java.io.File f)
throws java.io.IOException
releaseFile in interface MediaDatajava.io.IOException - public boolean isStream()
isStream in interface MediaData
public long length()
throws java.io.IOException
length in interface MediaDatajava.io.IOException - public boolean canSeek()
canSeek in interface MediaData
public void seek(long pos)
throws java.io.IOException
seek in interface MediaDatapos - the new current position.java.io.IOException -
public long getFilePointer()
throws java.io.IOException
getFilePointer in interface MediaDatajava.io.IOException -
public void setLength(long newLength)
throws java.io.IOException
setLength in interface MediaDatanewLength - java.io.IOException -
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in interface MediaDatab - off - len - java.io.IOException -
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in interface MediaDatajava.io.IOException -
public void close()
throws java.io.IOException
close in interface MediaDatajava.io.IOException -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||