Package org.openhab.core.audio
Class URLAudioStream
java.lang.Object
java.io.InputStream
org.openhab.core.audio.AudioStream
org.openhab.core.audio.URLAudioStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- ClonableAudioStream
This is an AudioStream from a URL. Note that some sinks, like Sonos, can directly handle URL
 based streams, and therefore can/should call getURL() to get a direct reference to the URL.
- Author:
- Karel Goderis - Initial contribution, Kai Kreuzer - Refactored to not require a source, Christoph Weitkamp - Refactored use of filename extension
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class org.openhab.core.audio.AudioStreamgetIdMethods inherited from class java.io.InputStreamavailable, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
- 
Field Details- 
M3U_EXTENSION- See Also:
 
- 
PLS_EXTENSION- See Also:
 
 
- 
- 
Constructor Details- 
URLAudioStream- Throws:
- AudioException
 
 
- 
- 
Method Details- 
getFormatDescription copied from class:AudioStreamGets the supported audio format- Specified by:
- getFormatin class- AudioStream
- Returns:
- The supported audio format
 
- 
read- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
- 
getURL
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException
 
- 
toString
- 
getClonedStreamDescription copied from interface:ClonableAudioStreamReturns a new, fully independent stream instance, which can be read and closed without impacting the original instance.- Specified by:
- getClonedStreamin interface- ClonableAudioStream
- Returns:
- a new input stream that can be consumed by the caller
- Throws:
- AudioException- if stream cannot be created
 
 
-