|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.baka.ambient.collection.AbstractAudio sk.baka.ambient.collection.FileAudio
public final class FileAudio
Denotes a file on the filesystem.
Constructor Summary | |
---|---|
FileAudio(String uri)
Creates new object instance. |
Method Summary | |
---|---|
boolean |
exists()
Checks if the file denoted by this object exists. |
String |
getMimeType()
Returns the file MIME type. |
long |
getSize()
Returns file size, in bytes. |
boolean |
isReadable()
Checks if the file denoted by this object is readable (i.e. |
InputStream |
openInputStream()
Reads the file contents. |
Methods inherited from class sk.baka.ambient.collection.AbstractAudio |
---|
fromUri, getLocation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
FileAudio(String uri)
uri
- the file location.Method Detail |
---|
public boolean exists()
AbstractAudio
exists
in class AbstractAudio
true
if the file exists, false
otherwise.public String getMimeType()
AbstractAudio
getMimeType
in class AbstractAudio
null
.public boolean isReadable()
AbstractAudio
isReadable
in class AbstractAudio
true
if the file is readable, false
otherwise.public InputStream openInputStream() throws IOException
AbstractAudio
openInputStream
in class AbstractAudio
null
.
IOException
- if i/o error occurs.public long getSize()
AbstractAudio
getSize
in class AbstractAudio
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |