正在查看: Housing v14.7.8 应用的 z.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Housing v14.7.8 应用的 z.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package u2;
import android.net.Uri;
import androidx.annotation.Nullable;
import androidx.media3.common.PlaybackException;
import androidx.media3.common.util.UnstableApi;
import androidx.media3.datasource.DataSpec;
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;
@UnstableApi
public final class z extends b {
public static final int DEFAULT_MAX_PACKET_SIZE = 2000;
public static final int DEFAULT_SOCKET_TIMEOUT_MILLIS = 8000;
public static final int UDP_PORT_UNSET = -1;
@Nullable
private InetAddress address;
@Nullable
private MulticastSocket multicastSocket;
private boolean opened;
private final DatagramPacket packet;
private final byte[] packetBuffer;
private int packetRemaining;
@Nullable
private DatagramSocket socket;
private final int socketTimeoutMillis;
@Nullable
private Uri uri;
public static final class a extends h {
public a(Throwable th, int i5) {
super(th, i5);
}
}
public z() {
this(2000);
}
@Override
public final void close() {
this.uri = null;
MulticastSocket multicastSocket = this.multicastSocket;
if (multicastSocket != null) {
try {
InetAddress inetAddress = this.address;
inetAddress.getClass();
multicastSocket.leaveGroup(inetAddress);
} catch (IOException unused) {
}
this.multicastSocket = null;
}
DatagramSocket datagramSocket = this.socket;
if (datagramSocket != null) {
datagramSocket.close();
this.socket = null;
}
this.address = null;
this.packetRemaining = 0;
if (this.opened) {
this.opened = false;
n();
}
}
@Override
public final Uri getUri() {
return this.uri;
}
@Override
public final long j(DataSpec dataSpec) {
Uri uri = dataSpec.uri;
this.uri = uri;
String host = uri.getHost();
host.getClass();
int port = this.uri.getPort();
o();
try {
this.address = InetAddress.getByName(host);
InetSocketAddress inetSocketAddress = new InetSocketAddress(this.address, port);
if (this.address.isMulticastAddress()) {
MulticastSocket multicastSocket = new MulticastSocket(inetSocketAddress);
this.multicastSocket = multicastSocket;
multicastSocket.joinGroup(this.address);
this.socket = this.multicastSocket;
} else {
this.socket = new DatagramSocket(inetSocketAddress);
}
this.socket.setSoTimeout(this.socketTimeoutMillis);
this.opened = true;
p(dataSpec);
return -1L;
} catch (IOException e5) {
throw new a(e5, PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED);
} catch (SecurityException e6) {
throw new a(e6, PlaybackException.ERROR_CODE_IO_NO_PERMISSION);
}
}
@Override
public final int read(byte[] bArr, int i5, int i6) {
if (i6 == 0) {
return 0;
}
if (this.packetRemaining == 0) {
try {
DatagramSocket datagramSocket = this.socket;
datagramSocket.getClass();
datagramSocket.receive(this.packet);
int length = this.packet.getLength();
this.packetRemaining = length;
m(length);
} catch (SocketTimeoutException e5) {
throw new a(e5, PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT);
} catch (IOException e6) {
throw new a(e6, PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED);
}
}
int length2 = this.packet.getLength();
int i7 = this.packetRemaining;
int min = Math.min(i7, i6);
System.arraycopy(this.packetBuffer, length2 - i7, bArr, i5, min);
this.packetRemaining -= min;
return min;
}
public z(int i5) {
this(i5, 8000);
}
public z(int i5, int i6) {
super(true);
this.socketTimeoutMillis = i6;
byte[] bArr = new byte[i5];
this.packetBuffer = bArr;
this.packet = new DatagramPacket(bArr, 0, i5);
}
}