alexandroid/decompiled/jadx/sources/com/facebook/soloader/ElfFileChannel.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

73 lines
2.2 KiB
Java

package com.facebook.soloader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes7.dex */
public class ElfFileChannel implements ElfByteChannel {
private FileChannel mFc;
private File mFile;
private FileInputStream mIs;
public ElfFileChannel(File file) throws IOException {
this.mFile = file;
openChannel();
}
@Override // java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
public void close() throws IOException {
this.mIs.close();
}
@Override // java.nio.channels.Channel
public boolean isOpen() {
return this.mFc.isOpen();
}
public void openChannel() throws IOException {
FileInputStream fileInputStream = new FileInputStream(this.mFile);
this.mIs = fileInputStream;
this.mFc = fileInputStream.getChannel();
}
@Override // com.facebook.soloader.ElfByteChannel
public long position() throws IOException {
return this.mFc.position();
}
@Override // com.facebook.soloader.ElfByteChannel, java.nio.channels.ReadableByteChannel
public int read(ByteBuffer byteBuffer) throws IOException {
return this.mFc.read(byteBuffer);
}
@Override // com.facebook.soloader.ElfByteChannel
public long size() throws IOException {
return this.mFc.size();
}
@Override // com.facebook.soloader.ElfByteChannel
public ElfByteChannel truncate(long j) throws IOException {
this.mFc.truncate(j);
return this;
}
@Override // com.facebook.soloader.ElfByteChannel, java.nio.channels.WritableByteChannel
public int write(ByteBuffer byteBuffer) throws IOException {
return this.mFc.write(byteBuffer);
}
@Override // com.facebook.soloader.ElfByteChannel
public ElfByteChannel position(long j) throws IOException {
this.mFc.position(j);
return this;
}
@Override // com.facebook.soloader.ElfByteChannel
public int read(ByteBuffer byteBuffer, long j) throws IOException {
return this.mFc.read(byteBuffer, j);
}
}