|
Knopflerfish OSGi 2.0.5 | |||||||||
| 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
org.knopflerfish.ant.taskdefs.bundle.ByteFormatterTask
Set a property to to a formated file size in k (kilo byte), M (Mega byte) etc.
| Attribute | Description | Required |
| property | The name of the property to assign the foramted value to. | Yes. |
| unit | The unit append to the formated value. E.g., byte | No, default is the empty string. |
| value | The value to format. | One of value and file must be given. |
| file | The file of get the size of and format. | One of value and file must be given. |
<byteformatter value="9093663"
property="myFormatedFilesize"
unit="b" />
<byteformatter file="archive.jar"
property="archive.size"
unit="B" />
| Field Summary |
| 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 | |
ByteFormatterTask()
Default constructor. |
|
| Method Summary | |
void |
execute()
Create or update the Manifest when used as a task. |
void |
setFile(java.io.File file)
Set the file to get the size of and format |
void |
setProperty(java.lang.String property)
The name of the property to save the foramted value to. |
void |
setUnit(java.lang.String unit)
The unit to append to the formated value. |
void |
setValue(long value)
Set the value to format. |
| 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 |
| Constructor Detail |
public ByteFormatterTask()
| Method Detail |
public void setProperty(java.lang.String property)
public void setUnit(java.lang.String unit)
public void setValue(long value)
value - the value to formatpublic void setFile(java.io.File file)
file - the file to return a formated file size for.public void execute()
BuildException - if the manifest cannot be written.
|
Knopflerfish OSGi 2.0.5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||