package io.netty.buffer;

import io.netty.util.internal.PlatformDependent;

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

    private static long addr(AbstractByteBuf abstractByteBuf, int i2) {
        return abstractByteBuf.memoryAddress() + ((long) i2);
    }

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

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

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

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

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

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