Class BasicDataPointer
java.lang.Object
org.javarosa.core.model.data.helper.BasicDataPointer
- All Implemented Interfaces:
IDataPointer,Externalizable
public class BasicDataPointer extends Object implements IDataPointer
Basic implementor of the IDataPointer interface that keeps everything in memory
- Author:
- Cory Zue
-
Constructor Summary
Constructors Constructor Description BasicDataPointer()NOTE: Only for serialization use.BasicDataPointer(String name, byte[] data) -
Method Summary
Modifier and Type Method Description booleandeleteData()Deletes the underlying data from storage.byte[]getData()Get the data from the underlying storage.InputStreamgetDataStream()Get the data from the underlying storage.StringgetDisplayText()Get a display string that represents this data.longgetLength()voidreadExternal(DataInputStream in, PrototypeFactory pf)voidwriteExternal(DataOutputStream out)
-
Constructor Details
-
BasicDataPointer
public BasicDataPointer()NOTE: Only for serialization use. -
BasicDataPointer
-
-
Method Details
-
deleteData
public boolean deleteData()Description copied from interface:IDataPointerDeletes the underlying data from storage.- Specified by:
deleteDatain interfaceIDataPointer
-
getData
public byte[] getData()Description copied from interface:IDataPointerGet the data from the underlying storage. This should maybe be a stream instead of a byte[]- Specified by:
getDatain interfaceIDataPointer- Returns:
-
getDisplayText
Description copied from interface:IDataPointerGet a display string that represents this data.- Specified by:
getDisplayTextin interfaceIDataPointer- Returns:
-
getDataStream
Description copied from interface:IDataPointerGet the data from the underlying storage.- Specified by:
getDataStreamin interfaceIDataPointer- Returns:
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getLength
public long getLength()- Specified by:
getLengthin interfaceIDataPointer- Returns:
- Gets the length of the data payload
-