Package org.apache.hc.client5.http.impl
Class Wire
java.lang.Object
org.apache.hc.client5.http.impl.Wire
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final org.slf4j.Logger
private static final int
private static final ThreadLocal
<StringBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringBuilder
Returns aStringBuilder
that this Layout implementation can use to write the formatted log event to.void
input
(byte[] b) void
input
(byte[] b, int pos, int off) void
input
(int b) void
void
input
(ByteBuffer b) boolean
void
output
(byte[] b) void
output
(byte[] b, int pos, int off) void
output
(int b) void
void
output
(ByteBuffer b) private static void
trimToMaxSize
(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 aStringBuilder
that 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
-