alexandroid/decompiled/jadx/sources/org/java_websocket/AbstractWrappedByteChannel.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

84 lines
2.8 KiB
Java

package org.java_websocket;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ByteChannel;
import java.nio.channels.SocketChannel;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Deprecated
/* loaded from: classes11.dex */
public class AbstractWrappedByteChannel implements WrappedByteChannel {
private final ByteChannel channel;
@Deprecated
public AbstractWrappedByteChannel(ByteChannel byteChannel) {
this.channel = byteChannel;
}
@Override // java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
public void close() throws IOException {
this.channel.close();
}
@Override // org.java_websocket.WrappedByteChannel
public boolean isBlocking() {
ByteChannel byteChannel = this.channel;
if (byteChannel instanceof SocketChannel) {
return ((SocketChannel) byteChannel).isBlocking();
}
if (byteChannel instanceof WrappedByteChannel) {
return ((WrappedByteChannel) byteChannel).isBlocking();
}
return false;
}
@Override // org.java_websocket.WrappedByteChannel
public boolean isNeedRead() {
ByteChannel byteChannel = this.channel;
return (byteChannel instanceof WrappedByteChannel) && ((WrappedByteChannel) byteChannel).isNeedRead();
}
@Override // org.java_websocket.WrappedByteChannel
public boolean isNeedWrite() {
ByteChannel byteChannel = this.channel;
return (byteChannel instanceof WrappedByteChannel) && ((WrappedByteChannel) byteChannel).isNeedWrite();
}
@Override // java.nio.channels.Channel
public boolean isOpen() {
return this.channel.isOpen();
}
@Override // java.nio.channels.ReadableByteChannel
public int read(ByteBuffer byteBuffer) throws IOException {
return this.channel.read(byteBuffer);
}
@Override // org.java_websocket.WrappedByteChannel
public int readMore(ByteBuffer byteBuffer) throws IOException {
ByteChannel byteChannel = this.channel;
if (byteChannel instanceof WrappedByteChannel) {
return ((WrappedByteChannel) byteChannel).readMore(byteBuffer);
}
return 0;
}
@Override // java.nio.channels.WritableByteChannel
public int write(ByteBuffer byteBuffer) throws IOException {
return this.channel.write(byteBuffer);
}
@Override // org.java_websocket.WrappedByteChannel
public void writeMore() throws IOException {
ByteChannel byteChannel = this.channel;
if (byteChannel instanceof WrappedByteChannel) {
((WrappedByteChannel) byteChannel).writeMore();
}
}
@Deprecated
public AbstractWrappedByteChannel(WrappedByteChannel wrappedByteChannel) {
this.channel = wrappedByteChannel;
}
}