|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.knowcenter.wag.egov.egiz.pdf.SplitStrings
public class SplitStrings
Class that helps filling out the placeholders.
This class treats a sequence of placeholder StringInfos like a continuous data area that can be filled out regarding the boundaries.
| Field Summary | |
|---|---|
protected int |
cur_pos
The current write position within the current string. |
protected int |
cur_string
The current string which is written to. |
static byte |
FILL_BYTE
The byte used to fill unused bytes in the placeholders. |
protected byte[] |
pdf
The underlying PDF. |
protected StringInfo[] |
strings
The strings to be filled out. |
| Constructor Summary | |
|---|---|
SplitStrings(byte[] pdf,
List strings)
Constructor. |
|
| Method Summary | |
|---|---|
void |
fillRest()
Fills all rest bytes with the fill character. |
boolean |
fits(byte[] data)
Tells, if the whole data would fit into the current string. |
int |
getAvailable()
Returns how many bytes are still available in the current string. |
boolean |
isValidLine()
Tells, if the current line is valid. |
void |
newline()
Fills the current string with the fill character and moves on to the next string. |
void |
write(byte[] data)
Writes the data into the current string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte FILL_BYTE
protected byte[] pdf
protected StringInfo[] strings
protected int cur_string
protected int cur_pos
| Constructor Detail |
|---|
public SplitStrings(byte[] pdf,
List strings)
pdf - The underlying PDF.strings - The strings to be filled out.| Method Detail |
|---|
public int getAvailable()
public boolean fits(byte[] data)
data - The data to be matched for fitting
public void write(byte[] data)
Note that the data must fit in.
data - The data to be written.public void newline()
public void fillRest()
This should be called when everything is finished to fill all strings properly.
public boolean isValidLine()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||