Class ByteArrayBuilder
java.lang.Object
org.apache.hc.client5.http.utils.ByteArrayBuilder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(byte[] b) append(byte[] b, int off, int len) append(char[] b) append(char[] b, int off, int len) append(CharBuffer charBuffer) intcapacity()private voiddoAppend(CharBuffer charBuffer) (package private) static ByteBufferencode(ByteBuffer buffer, CharBuffer in, CharsetEncoder encoder) voidensureFreeCapacity(int freeCapacity) (package private) static ByteBufferensureFreeCapacity(ByteBuffer buffer, int capacity) voidreset()byte[]toString()
-
Field Details
-
charsetEncoder
-
buffer
-
-
Constructor Details
-
ByteArrayBuilder
public ByteArrayBuilder() -
ByteArrayBuilder
public ByteArrayBuilder(int initialCapacity)
-
-
Method Details
-
capacity
public int capacity() -
ensureFreeCapacity
-
encode
static ByteBuffer encode(ByteBuffer buffer, CharBuffer in, CharsetEncoder encoder) throws CharacterCodingException - Throws:
CharacterCodingException
-
ensureFreeCapacity
public void ensureFreeCapacity(int freeCapacity) -
doAppend
-
charset
-
append
-
append
-
append
-
append
-
append
-
append
-
toByteBuffer
-
toByteArray
public byte[] toByteArray() -
reset
public void reset() -
toString
-