org.zodiac.netty.http.headers.CharSequenceHeader Maven / Gradle / Ivy
package org.zodiac.netty.http.headers;
import java.util.Objects;
import io.netty.util.AsciiString;
final class CharSequenceHeader extends AbstractHeader {
CharSequenceHeader(CharSequence name) {
super(CharSequence.class, AsciiString.of(name));
}
@Override
public CharSequence toValue(CharSequence value) {
return AsciiString.of(Objects.requireNonNull(value, "value"));
}
@Override
public CharSequence toCharSequence(CharSequence value) {
return Objects.requireNonNull(value, "value");
}
}