|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jmatchparser.util.split.SplitRule
net.sf.jmatchparser.util.split.CountSplitRule
public class CountSplitRule
A split rule that creates a new output file every given number of bytes or lines.
Constructor Summary | |
---|---|
CountSplitRule(int desiredSize,
boolean lines)
Create a new rule that splits after a given number of bytes or lines. |
|
CountSplitRule(int desiredSize,
char charToCount)
Create a new rule that splits after a given number a give character. |
Method Summary | |
---|---|
int |
findSplitPos(byte[] data,
int off,
int len)
Check the given bytes whether the output stream has to be split in between or after the given bytes. |
void |
update(byte[] data,
int off,
int len)
Update the internal state of this split rule after some bytes have been output. |
Methods inherited from class net.sf.jmatchparser.util.split.SplitRule |
---|
findSplitPos, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CountSplitRule(int desiredSize, boolean lines)
desiredSize
- Number of bytes/lineslines
- true
for lines, false
for bytespublic CountSplitRule(int desiredSize, char charToCount)
desiredSize
- Number of bytes/linescharToCount
- character that should be counted, or 0 to count all charactersMethod Detail |
---|
public int findSplitPos(byte[] data, int off, int len)
SplitRule
findSplitPos
in class SplitRule
data
- bytes that should be outputoff
- start offsetlen
- length
public void update(byte[] data, int off, int len)
SplitRule
update
in class SplitRule
data
- bytes that have been outputoff
- start offsetlen
- length
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |