public class SplitTask
extends org.apache.tools.ant.Task
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE
Buffer size for read and write operations.
|
| Constructor and Description |
|---|
SplitTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Split the given property, value, or file into pieces.
|
void |
setBytes(int b)
Set the number of bytes per part.
|
void |
setFailonerror(boolean fail)
Determines whether the build should fail if there is an error.
|
void |
setFile(java.io.File f)
Split the contents of the given file.
|
void |
setLines(int x)
Set the number of lines per part, default is 1000.
|
void |
setOutputdir(java.io.File d)
Where to put the parts.
|
void |
setPrefix(java.lang.String x)
The start of the file names to write.
|
void |
setProperty(java.lang.String p)
Split the text value of the given property.
|
void |
setSize(java.lang.String b)
The linux split command allows modifiers: b for 512, k for 1K, m for 1
Meg.
|
void |
setValue(java.lang.String v)
Split the given string.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic static final int BUFFER_SIZE
public void setPrefix(java.lang.String x)
x - The new prefix valuepublic void setBytes(int b)
b - number of bytes per part.public void setSize(java.lang.String b)
b - the number of bytes per part, with an optional modifier. If
there is no modifier, treat same as setBytes(int). For example,
setSize("100k") is the same as setBytes(100 * 1024). Note that the
maximum size must be smaller than Integer.MAX_VALUE (2147483647).public void setLines(int x)
x - The number of lines per part.public void setProperty(java.lang.String p)
p - the name of the property whose value will be split.public void setValue(java.lang.String v)
v - a stringpublic void setFile(java.io.File f)
f - the name of the filepublic void setOutputdir(java.io.File d)
d - the output directorypublic void setFailonerror(boolean fail)
fail - true or falsepublic void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildException - only if failOnError is true