int id = 622;
String url = "http://www.allcast.is/stream.php?id=" + id + "&width=100%&height=100%&stretching=uniform";
Response response = Http.post3(url, null, Header.create().set("Referer", "http://showsport-tv.com/embedplayer.php?ch=bein1&server=1").set("content-encoding", "gzip"), 6000);
if (response.isOK()) {
String content = response.getContent();
System.out.println(content);
控制台错误
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: Corrupt GZIP trailer
at org.nutz.lang.Lang.wrapThrow(Lang.java:184)
at org.nutz.lang.Streams.readAndClose(Streams.java:293)
at org.nutz.http.Response.getContent(Response.java:150)
at org.nutz.http.Response.getContent(Response.java:143)
at com.anawin.hls.Beins.main(Beins.java:15)
Caused by: java.util.zip.ZipException: Corrupt GZIP trailer
at java.util.zip.GZIPInputStream.readTrailer(GZIPInputStream.java:225)
at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:119)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.Reader.read(Reader.java:140)
at org.nutz.lang.Streams.read(Streams.java:316)
at org.nutz.lang.Streams.read(Streams.java:274)
at org.nutz.lang.Streams.readAndClose(Streams.java:290)
... 3 more