java.lang.Objectcom.realtime.crossfire.jxclient.sound.AudioFileLoader
public class AudioFileLoader
Locates audio files.
| Field Summary | |
|---|---|
private DebugWriter |
debugSound
The writer for logging sound related information or null to
not log. |
| Constructor Summary | |
|---|---|
AudioFileLoader(DebugWriter debugSound)
Private constructor to prevent instantiation. |
|
| Method Summary | |
|---|---|
java.io.InputStream |
getInputStream(java.lang.String name,
java.lang.String action)
Returns an input stream for an audio file. |
private java.io.InputStream |
getResource(java.lang.String name)
Returns an input stream for an audio file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Nullable private final DebugWriter debugSound
null to
not log.
| Constructor Detail |
|---|
public AudioFileLoader(@Nullable
DebugWriter debugSound)
debugSound - the writer for logging sound related information or
null to not log| Method Detail |
|---|
@NotNull
public java.io.InputStream getInputStream(@Nullable
java.lang.String name,
@NotNull
java.lang.String action)
throws java.io.IOException
action identifies
the audio file. name is an optional prefix.
name - the nameaction - the action; may be null
java.io.IOException - if the file cannot be located
@NotNull
private java.io.InputStream getResource(@NotNull
java.lang.String name)
throws java.io.IOException
name - the resource name
java.io.IOException - if the file cannot be located