package io.netty.handler.codec.redis;

import g.a.a.a.a;

/* JADX INFO: loaded from: classes.dex */
public class BulkStringHeaderRedisMessage implements RedisMessage {
    private final int bulkStringLength;

    public BulkStringHeaderRedisMessage(int i2) {
        if (i2 <= 0) {
            throw new RedisCodecException(a.n("bulkStringLength: ", i2, " (expected: > 0)"));
        }
        this.bulkStringLength = i2;
    }

    public final int bulkStringLength() {
        return this.bulkStringLength;
    }

    public boolean isNull() {
        return this.bulkStringLength == -1;
    }
}
