Class ByteBuffer
java.lang.Object
com.itextpdf.io.source.ByteBuffer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(byte b) append(byte[] b) append(byte[] b, int off, int len) append(int b) appendHex(byte b) intcapacity()byteget(int index) static intgetHex(int v) byte[]booleanisEmpty()(package private) ByteBufferprepend(byte b) FillByteBufferfrom the end.(package private) ByteBufferprepend(byte[] b) FillByteBufferfrom the end.reset()intsize()booleanstartsWith(byte[] b) byte[]byte[]toByteArray(int off, int len)
-
Field Details
-
bytes
private static final byte[] bytes -
count
protected int count -
buffer
private byte[] buffer
-
-
Constructor Details
-
ByteBuffer
public ByteBuffer() -
ByteBuffer
public ByteBuffer(int size)
-
-
Method Details
-
getHex
public static int getHex(int v) -
append
-
append
-
append
-
append
-
append
-
appendHex
-
get
public byte get(int index) -
getInternalBuffer
public byte[] getInternalBuffer() -
size
public int size() -
isEmpty
public boolean isEmpty() -
capacity
public int capacity() -
reset
-
toByteArray
public byte[] toByteArray(int off, int len) -
toByteArray
public byte[] toByteArray() -
startsWith
public boolean startsWith(byte[] b) -
prepend
FillByteBufferfrom the end. Set byte atcapacity() - size() - 1position.- Parameters:
b-byte.- Returns:
ByteBuffer.
-
prepend
FillByteBufferfrom the end. Set bytes fromcapacity() - size() - b.lengthposition.- Parameters:
b-byte.- Returns:
ByteBuffer.
-