Class Wire
java.lang.Object
org.apache.hc.client5.http.impl.Wire
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final org.slf4j.Loggerprivate static final intprivate static final ThreadLocal<StringBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringBuilderReturns aStringBuilderthat this Layout implementation can use to write the formatted log event to.voidinput(byte[] b) voidinput(byte[] b, int pos, int off) voidinput(int b) voidvoidinput(ByteBuffer b) booleanvoidoutput(byte[] b) voidoutput(byte[] b, int pos, int off) voidoutput(int b) voidvoidoutput(ByteBuffer b) private static voidtrimToMaxSize(StringBuilder stringBuilder, int maxSize) Ensures that the char[] array of the specified StringBuilder does not exceed the specified number of characters.private void
-
Field Details
-
MAX_STRING_BUILDER_SIZE
private static final int MAX_STRING_BUILDER_SIZE- See Also:
-
THREAD_LOCAL
-
log
private final org.slf4j.Logger log -
id
-
-
Constructor Details
-
Wire
-
-
Method Details
-
getStringBuilder
Returns aStringBuilderthat this Layout implementation can use to write the formatted log event to.- Returns:
- a
StringBuilder
-
trimToMaxSize
Ensures that the char[] array of the specified StringBuilder does not exceed the specified number of characters. This method is useful to ensure that excessively long char[] arrays are not kept in memory forever.- Parameters:
stringBuilder- the StringBuilder to checkmaxSize- the maximum number of characters the StringBuilder is allowed to have
-
wire
-
isEnabled
public boolean isEnabled() -
output
public void output(byte[] b, int pos, int off) -
input
public void input(byte[] b, int pos, int off) -
output
public void output(byte[] b) -
input
public void input(byte[] b) -
output
public void output(int b) -
input
public void input(int b) -
output
-
input
-
output
-
input
-