Reduce dependency on commons-io and commons-codec (#10614)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2021-04-30 16:53:44 +02:00
committed by GitHub
parent 02b4943a11
commit e6d8dfb7e1
20 changed files with 175 additions and 124 deletions

View File

@@ -23,7 +23,6 @@ import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.IOUtils;
import org.openhab.binding.allplay.internal.AllPlayBindingConstants;
import org.openhab.binding.allplay.internal.AllPlayBindingProperties;
import org.openhab.core.common.ThreadPoolManager;
@@ -538,7 +537,7 @@ public class AllPlayHandler extends BaseThingHandler
private byte[] getRawDataFromUrl(String urlString) throws Exception {
URL url = new URL(urlString);
URLConnection connection = url.openConnection();
return IOUtils.toByteArray(connection.getInputStream());
return connection.getInputStream().readAllBytes();
}
private int convertPercentToAbsoluteVolume(PercentType percentVolume) throws SpeakerException {