Package org.openhab.core.audio
Class AudioStream
java.lang.Object
java.io.InputStream
org.openhab.core.audio.AudioStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
- Direct Known Subclasses:
- FixedLengthAudioStream,- PipedAudioStream,- URLAudioStream
Wrapper for a source of audio data.
 In contrast to 
AudioSource, this is often a "one time use" instance for passing some audio data,
 but it is not meant to be registered as a service.
 The stream needs to be closed by the client that uses it.- Author:
- Harald Kuhn - Initial contribution, Kelly Davis - Modified to match discussion in #584, Kai Kreuzer - Refactored to be only a temporary instance for the stream
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract AudioFormatGets the supported audio format@Nullable StringgetId()Usefull for sinks playing the same stream multiple times, to avoid already done computation (like reencoding).Methods inherited from class java.io.InputStreamavailable, close, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
- 
Constructor Details- 
AudioStreampublic AudioStream()
 
- 
- 
Method Details- 
getFormatGets the supported audio format- Returns:
- The supported audio format
 
- 
getIdUsefull for sinks playing the same stream multiple times, to avoid already done computation (like reencoding).- Returns:
- A string uniquely identifying the stream.
 
 
-