Class DataDefinition
- Object
-
- DataDefinition
-
public class DataDefinition extends Object
Field definition- Author:
- Tommaso Nolli
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classDataDefinition.FieldInner class for Data fields
-
Constructor Summary
Constructors Constructor Description DataDefinition(String charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddField(int len)For classes with unknown length; this values will be threated asStrings and truncated at the specified lenvoidaddField(Class<?> clazz)Well known classes Short Integer Long Float Double DateCharsetgetCharset()Character set values are encoded in.intgetEncodedLen()Gets the len of this field after the encoding, this method may be different from getLen() only if exists strings in the definitionDataDefinition.FieldgetField(int i)intgetFieldsCount()intgetLen()Gets the max len of the databooleanisValid()
-
-
-
Constructor Detail
-
DataDefinition
public DataDefinition(String charset)
-
-
Method Detail
-
isValid
public final boolean isValid()
-
getFieldsCount
public int getFieldsCount()
-
getField
public DataDefinition.Field getField(int i)
-
addField
public void addField(Class<?> clazz)
Well known classes- Short
- Integer
- Long
- Float
- Double
- Date
-
addField
public void addField(int len)
For classes with unknown length; this values will be threated asStrings and truncated at the specified len
-
getCharset
public Charset getCharset()
Character set values are encoded in.
-
getLen
public int getLen()
Gets the max len of the data
-
getEncodedLen
public int getEncodedLen()
Gets the len of this field after the encoding, this method may be different from getLen() only if exists strings in the definition
-
-