Acts like a StringBuilder but works with byte arrays. floating point is converted to a format suitable to the PDF.
- Author
- Paulo Soares (psoar.nosp@m.es@c.nosp@m.onsis.nosp@m.te.p.nosp@m.t)
◆ ByteBuffer() [1/2]
| iTextSharp.text.pdf.ByteBuffer.ByteBuffer |
( |
| ) |
|
◆ ByteBuffer() [2/2]
| iTextSharp.text.pdf.ByteBuffer.ByteBuffer |
( |
int |
size | ) |
|
Creates a byte buffer with a certain capacity.
- Parameters
-
◆ Append() [1/9]
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.Append |
( |
byte |
b | ) |
|
◆ Append() [2/9]
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.Append |
( |
byte[] |
b | ) |
|
Appends an array of bytes.
- Parameters
-
| b | the array to be appended |
- Returns
- a reference to this
ByteBuffer object
◆ Append() [3/9]
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.Append |
( |
byte[] |
b, |
|
|
int |
off, |
|
|
int |
len |
|
) |
| |
Appends the subarray of the byte array. The buffer will grow by len bytes.
- Parameters
-
| b | the array to be appended |
| off | the offset to the start of the array |
| len | the length of bytes to Append |
- Returns
- a reference to this
ByteBuffer object
◆ Append() [4/9]
◆ Append() [5/9]
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.Append |
( |
char |
c | ) |
|
Appends a char to the buffer. The char is converted according to the encoding ISO-8859-1.
- Parameters
-
- Returns
- a reference to this
ByteBuffer object
◆ Append() [6/9]
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.Append |
( |
double |
d | ) |
|
Appends a string representation of a double according to the Pdf conventions.
- Parameters
-
| d | the double to be appended |
- Returns
- a reference to this
ByteBuffer object
◆ Append() [7/9]
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.Append |
( |
float |
i | ) |
|
Appends a string representation of a float according to the Pdf conventions.
- Parameters
-
| i | the float to be appended |
- Returns
- a reference to this
ByteBuffer object
◆ Append() [8/9]
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.Append |
( |
int |
i | ) |
|
Appends the string representation of an int.
- Parameters
-
- Returns
- a reference to this
ByteBuffer object
◆ Append() [9/9]
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.Append |
( |
string |
str | ) |
|
Appends a string to the buffer. The string is converted according to the encoding ISO-8859-1.
- Parameters
-
| str | the string to be appended |
- Returns
- a reference to this
ByteBuffer object
◆ Append_i()
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.Append_i |
( |
int |
b | ) |
|
Appends an int. The size of the array will grow by one.
- Parameters
-
- Returns
- a reference to this
ByteBuffer object
◆ AppendHex()
| ByteBuffer iTextSharp.text.pdf.ByteBuffer.AppendHex |
( |
byte |
b | ) |
|
◆ FillCache()
| static void iTextSharp.text.pdf.ByteBuffer.FillCache |
( |
int |
decimals | ) |
|
|
static |
You can fill the cache in advance if you want to.
- Parameters
-
◆ Flush()
| override void iTextSharp.text.pdf.ByteBuffer.Flush |
( |
| ) |
|
◆ FormatDouble() [1/2]
| static string iTextSharp.text.pdf.ByteBuffer.FormatDouble |
( |
double |
d | ) |
|
|
static |
Outputs a double into a format suitable for the PDF.
- Parameters
-
- Returns
- the
string representation of the double
◆ FormatDouble() [2/2]
| static string iTextSharp.text.pdf.ByteBuffer.FormatDouble |
( |
double |
d, |
|
|
ByteBuffer |
buf |
|
) |
| |
|
static |
Outputs a double into a format suitable for the PDF.
- Parameters
-
- Returns
- the
String representation of the double if buf is null. If buf is not null, then the double is appended directly to the buffer and this methods returns null.
◆ Read()
| override int iTextSharp.text.pdf.ByteBuffer.Read |
( |
byte[] |
buffer, |
|
|
int |
offset, |
|
|
int |
count |
|
) |
| |
◆ Reset()
| void iTextSharp.text.pdf.ByteBuffer.Reset |
( |
| ) |
|
◆ Seek()
| override long iTextSharp.text.pdf.ByteBuffer.Seek |
( |
long |
offset, |
|
|
SeekOrigin |
origin |
|
) |
| |
◆ SetCacheSize()
| static void iTextSharp.text.pdf.ByteBuffer.SetCacheSize |
( |
int |
size | ) |
|
|
static |
Sets the cache size.
This can only be used to increment the size. If the size that is passed through is smaller than the current size, nothing happens.
- Parameters
-
| size | the size of the cache |
◆ SetLength()
| override void iTextSharp.text.pdf.ByteBuffer.SetLength |
( |
long |
value | ) |
|
◆ ToByteArray()
| byte [] iTextSharp.text.pdf.ByteBuffer.ToByteArray |
( |
| ) |
|
Creates a newly allocated byte array. Its size is the current size of this output stream and the valid contents of the buffer have been copied into it.
- Returns
- the current contents of this output stream, as a byte array.
◆ ToString()
| override string iTextSharp.text.pdf.ByteBuffer.ToString |
( |
| ) |
|
Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding.
- Returns
- string translated from the buffer's contents.
◆ Write()
| override void iTextSharp.text.pdf.ByteBuffer.Write |
( |
byte[] |
buffer, |
|
|
int |
offset, |
|
|
int |
count |
|
) |
| |
◆ WriteByte()
| override void iTextSharp.text.pdf.ByteBuffer.WriteByte |
( |
byte |
value | ) |
|
◆ WriteTo()
| void iTextSharp.text.pdf.ByteBuffer.WriteTo |
( |
Stream |
str | ) |
|
Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding.
- Parameters
-
| enc | a character-encoding name. |
- Returns
- string translated from the buffer's contents.
- Exceptions
-
| UnsupportedEncodingException | If the named encoding is not supported. Writes the complete contents of this byte buffer output to the specified output stream argument, as if by calling the output stream's write method using out.Write(buf, 0, count). |
- Parameters
-
| out | the output stream to which to write the data. |
- Exceptions
-
| IOException | if an I/O error occurs. |
◆ buf
| byte [] iTextSharp.text.pdf.ByteBuffer.buf |
|
protected |
The buffer where the bytes are stored.
◆ count
| int iTextSharp.text.pdf.ByteBuffer.count |
|
protected |
The count of bytes in the buffer.
◆ HIGH_PRECISION
| bool iTextSharp.text.pdf.ByteBuffer.HIGH_PRECISION = false |
|
static |
If true always output floating point numbers with 6 decimal digits. If false uses the faster, although less precise, representation.
◆ ZERO
| const byte iTextSharp.text.pdf.ByteBuffer.ZERO = (byte)'0' |
|
static |
◆ Buffer
| byte [] iTextSharp.text.pdf.ByteBuffer.Buffer |
|
get |
◆ CanRead
| override bool iTextSharp.text.pdf.ByteBuffer.CanRead |
|
get |
◆ CanSeek
| override bool iTextSharp.text.pdf.ByteBuffer.CanSeek |
|
get |
◆ CanWrite
| override bool iTextSharp.text.pdf.ByteBuffer.CanWrite |
|
get |
◆ Length
| override long iTextSharp.text.pdf.ByteBuffer.Length |
|
get |
◆ Position
| override long iTextSharp.text.pdf.ByteBuffer.Position |
|
getset |
◆ Size
| int iTextSharp.text.pdf.ByteBuffer.Size |
|
getset |
Returns the current size of the buffer.
- Returns
- the value of the
count field, which is the number of valid bytes in this byte buffer.
The documentation for this class was generated from the following file: