
com.github.bingoohuang.springrestclient.provider.AbbreviateAppendable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-rest-client Show documentation
Show all versions of spring-rest-client Show documentation
convenient spring rest client for rest services
package com.github.bingoohuang.springrestclient.provider;
import org.apache.commons.lang3.StringUtils;
class AbbreviateAppendable implements Appendable {
private final StringBuilder logStr;
private final StringBuilder signStr;
public AbbreviateAppendable(StringBuilder logStr, StringBuilder signStr) {
this.logStr = logStr;
this.signStr = signStr;
}
@Override
public Appendable append(String str) {
logStr.append(str);
signStr.append(str);
return this;
}
@Override
public Appendable appendAbbreviate(String str) {
logStr.append(StringUtils.abbreviate(str, 100));
signStr.append(str);
return this;
}
@Override
public Appendable append(char ch) {
logStr.append(ch);
signStr.append(ch);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy