MD5 校验值:8d01bad3385dcb060a6dcda2da0f8dbf
z.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package x0; import android.net.Uri; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.MulticastSocket; import java.net.SocketTimeoutException; public final class z extends b { private final int f26841e; private final byte[] f26842f; private final DatagramPacket f26843g; private Uri f26844h; private DatagramSocket f26845i; private MulticastSocket f26846j; private InetAddress f26847k; private boolean f26848l; private int f26849m; public static final class a extends h { public a(Throwable th, int i10) { super(th, i10); } } public z() { this(2000); } public z(int i10) { this(i10, 8000); } public z(int i10, int i11) { super(true); this.f26841e = i11; byte[] bArr = new byte[i10]; this.f26842f = bArr; this.f26843g = new DatagramPacket(bArr, 0, i10); } @Override public void close() { this.f26844h = null; MulticastSocket multicastSocket = this.f26846j; if (multicastSocket != null) { try { multicastSocket.leaveGroup((InetAddress) v0.a.e(this.f26847k)); } catch (IOException unused) { } this.f26846j = null; } DatagramSocket datagramSocket = this.f26845i; if (datagramSocket != null) { datagramSocket.close(); this.f26845i = null; } this.f26847k = null; this.f26849m = 0; if (this.f26848l) { this.f26848l = false; t(); } } @Override public Uri getUri() { return this.f26844h; } public int m() { DatagramSocket datagramSocket = this.f26845i; if (datagramSocket == null) { return -1; } return datagramSocket.getLocalPort(); } @Override public long r(k kVar) { Uri uri = kVar.f26755a; this.f26844h = uri; String str = (String) v0.a.e(uri.getHost()); int port = this.f26844h.getPort(); u(kVar); try { this.f26847k = InetAddress.getByName(str); InetSocketAddress inetSocketAddress = new InetSocketAddress(this.f26847k, port); if (this.f26847k.isMulticastAddress()) { MulticastSocket multicastSocket = new MulticastSocket(inetSocketAddress); this.f26846j = multicastSocket; multicastSocket.joinGroup(this.f26847k); this.f26845i = this.f26846j; } else { this.f26845i = new DatagramSocket(inetSocketAddress); } this.f26845i.setSoTimeout(this.f26841e); this.f26848l = true; v(kVar); return -1L; } catch (IOException e10) { throw new a(e10, 2001); } catch (SecurityException e11) { throw new a(e11, 2006); } } @Override public int read(byte[] bArr, int i10, int i11) { if (i11 == 0) { return 0; } if (this.f26849m == 0) { try { ((DatagramSocket) v0.a.e(this.f26845i)).receive(this.f26843g); int length = this.f26843g.getLength(); this.f26849m = length; s(length); } catch (SocketTimeoutException e10) { throw new a(e10, 2002); } catch (IOException e11) { throw new a(e11, 2001); } } int length2 = this.f26843g.getLength(); int i12 = this.f26849m; int min = Math.min(i12, i11); System.arraycopy(this.f26842f, length2 - i12, bArr, i10, min); this.f26849m -= min; return min; } }