Package com.itextpdf.io.source
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) int
capacity()
byte
get
(int index) static int
getHex
(int v) byte[]
boolean
isEmpty()
(package private) ByteBuffer
prepend
(byte b) FillByteBuffer
from the end.(package private) ByteBuffer
prepend
(byte[] b) FillByteBuffer
from the end.reset()
int
size()
boolean
startsWith
(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
FillByteBuffer
from the end. Set byte atcapacity() - size() - 1
position.- Parameters:
b
-byte
.- Returns:
ByteBuffer
.
-
prepend
FillByteBuffer
from the end. Set bytes fromcapacity() - size() - b.length
position.- Parameters:
b
-byte
.- Returns:
ByteBuffer
.
-