package io.netty.buffer;

import io.netty.util.internal.PlatformDependent;

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

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

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

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

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

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

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

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