|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.xmp.impl.ByteBuffer
public class ByteBuffer
Byte buffer container including length of valid data.
| Constructor Summary | |
|---|---|
ByteBuffer(byte[] buffer)
|
|
ByteBuffer(byte[] buffer,
int length)
|
|
ByteBuffer(byte[] buffer,
int offset,
int length)
|
|
ByteBuffer(InputStream in)
Loads the stream into a buffer. |
|
ByteBuffer(int initialCapacity)
|
|
| Method Summary | |
|---|---|
void |
append(byte b)
Appends a byte to the buffer. |
void |
append(byte[] bytes)
Append a byte array to the buffer |
void |
append(byte[] bytes,
int offset,
int len)
Appends a byte array or part of to the buffer. |
void |
append(ByteBuffer anotherBuffer)
Append another buffer to this buffer. |
byte |
byteAt(int index)
|
int |
charAt(int index)
|
InputStream |
getByteStream()
|
String |
getEncoding()
Detects the encoding of the byte buffer, stores and returns it. |
int |
length()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteBuffer(int initialCapacity)
initialCapacity - the initial capacity for this bufferpublic ByteBuffer(byte[] buffer)
buffer - a byte array that will be wrapped with ByteBuffer.
public ByteBuffer(byte[] buffer,
int length)
buffer - a byte array that will be wrapped with ByteBuffer.length - the length of valid bytes in the array
public ByteBuffer(InputStream in)
throws IOException
in - an InputStream
IOException - If the stream cannot be read.
public ByteBuffer(byte[] buffer,
int offset,
int length)
buffer - a byte array that will be wrapped with ByteBuffer.offset - the offset of the provided buffer.length - the length of valid bytes in the array| Method Detail |
|---|
public InputStream getByteStream()
public int length()
public byte byteAt(int index)
index - the index to retrieve the byte from
public int charAt(int index)
index - the index to retrieve a byte as int or char.
public void append(byte b)
b - a byte
public void append(byte[] bytes,
int offset,
int len)
bytes - a byte arrayoffset - an offset withlen - public void append(byte[] bytes)
bytes - a byte arraypublic void append(ByteBuffer anotherBuffer)
anotherBuffer - another ByteBufferpublic String getEncoding()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||