All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.netty.http.headers.AccelBufferingHeader Maven / Gradle / Ivy

package org.zodiac.netty.http.headers;

import org.zodiac.sdk.toolkit.util.lang.StrUtil;

import io.netty.util.AsciiString;

final class AccelBufferingHeader extends AbstractHeader {

    private static final AsciiString OFF = new AsciiString("off");
    private static final AsciiString ON = new AsciiString("on");

    public AccelBufferingHeader() {
        super(Boolean.TYPE, new AsciiString("X-Accel-Buffering"));
    }

    @Override
    public CharSequence toCharSequence(Boolean value) {
        return value ? ON : OFF;
    }

    @Override
    public Boolean toValue(CharSequence value) {
        return StrUtil.equalsCharSeq(ON, value);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy