|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
ise.antelope.tasks.SplitTask
public class SplitTask
This task is similar to the Unix/Linux split utility, it splits a file into a number of smaller pieces. It will also split a property value or a string.
| Field Summary | |
|---|---|
static int |
BUFFER_SIZE
Buffer size for read and write operations. |
| Fields inherited from class org.apache.tools.ant.Task |
|---|
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
SplitTask()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BUFFER_SIZE
| Constructor Detail |
|---|
public SplitTask()
| Method Detail |
|---|
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 false
public 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
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||