package io.netty.buffer;

import io.netty.util.internal.PlatformDependent;

/* JADX INFO: loaded from: classes.dex */
public final class UnsafeHeapSwappedByteBuf extends AbstractUnsafeSwappedByteBuf {
    public UnsafeHeapSwappedByteBuf(AbstractByteBuf abstractByteBuf) {
        super(abstractByteBuf);
    }

    private static int idx(ByteBuf byteBuf, int i2) {
        return byteBuf.arrayOffset() + i2;
    }

    @Override // io.netty.buffer.AbstractUnsafeSwappedByteBuf
    public int _getInt(AbstractByteBuf abstractByteBuf, int i2) {
        return PlatformDependent.getInt(abstractByteBuf.array(), idx(abstractByteBuf, i2));
    }

    @Override // io.netty.buffer.AbstractUnsafeSwappedByteBuf
    public long _getLong(AbstractByteBuf abstractByteBuf, int i2) {
        return PlatformDependent.getLong(abstractByteBuf.array(), idx(abstractByteBuf, i2));
    }

    @Override // io.netty.buffer.AbstractUnsafeSwappedByteBuf
    public short _getShort(AbstractByteBuf abstractByteBuf, int i2) {
        return PlatformDependent.getShort(abstractByteBuf.array(), idx(abstractByteBuf, i2));
    }

    @Override // io.netty.buffer.AbstractUnsafeSwappedByteBuf
    public void _setInt(AbstractByteBuf abstractByteBuf, int i2, int i3) {
        PlatformDependent.putInt(abstractByteBuf.array(), idx(abstractByteBuf, i2), i3);
    }

    @Override // io.netty.buffer.AbstractUnsafeSwappedByteBuf
    public void _setLong(AbstractByteBuf abstractByteBuf, int i2, long j2) {
        PlatformDependent.putLong(abstractByteBuf.array(), idx(abstractByteBuf, i2), j2);
    }

    @Override // io.netty.buffer.AbstractUnsafeSwappedByteBuf
    public void _setShort(AbstractByteBuf abstractByteBuf, int i2, short s2) {
        PlatformDependent.putShort(abstractByteBuf.array(), idx(abstractByteBuf, i2), s2);
    }
}
