The following example shows how the DataAmount annotation can be used to
set the units BITS and BYTES to event fields.
@Name("com.example.ImageRender") @Label("Image Render") public class ImageRender extends Event { @Label("Height") long height; @Label("Width") long width; @Label("Color Depth") @DataAmount(DataAmount.BITS) int colorDepth; @Label("Memory Size") @DataAmount // bytes by default long memorySize; }
| Modifier and Type | Field and Description |
|---|---|
| public static final String | BITS
Unit for bits |
| public static final String | BYTES
Unit for bytes |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the data amount unit, defaultBYTESReturns the unit for the data amount, by default bytes. |
| BITS | back to summary |
|---|---|
| public static final String BITS Unit for bits | |
| BYTES | back to summary |
|---|---|
| public static final String BYTES Unit for bytes | |
| value | back to summary |
|---|---|
| public String value() Returns the unit for the data amount, by default bytes.
| |