Class ExtUtil
java.lang.Object
org.javarosa.core.util.externalizable.ExtUtil
public class ExtUtil extends Object
-
Field Summary
Fields Modifier and Type Field Description static booleaninterningstatic CacheTable<String>stringCache -
Constructor Summary
Constructors Constructor Description ExtUtil() -
Method Summary
-
Field Details
-
interning
public static boolean interning -
stringCache
-
-
Constructor Details
-
ExtUtil
public ExtUtil()
-
-
Method Details
-
serialize
-
deserialize
- Throws:
DeserializationException
-
deserialize
public static Object deserialize(byte[] data, ExternalizableWrapper ew) throws DeserializationException- Throws:
DeserializationException
-
getSize
-
defaultPrototypes
-
write
- Throws:
IOException
-
writeNumeric
- Throws:
IOException
-
writeNumeric
public static void writeNumeric(DataOutputStream out, long val, ExtWrapIntEncoding encoding) throws IOException- Throws:
IOException
-
writeChar
- Throws:
IOException
-
writeDecimal
- Throws:
IOException
-
writeBool
- Throws:
IOException
-
writeString
- Throws:
IOException
-
writeDate
- Throws:
IOException
-
writeBytes
- Throws:
IOException
-
writeInts
- Throws:
IOException
-
writeAttributes
public static void writeAttributes(DataOutputStream out, List<TreeElement> attributes) throws IOException- Throws:
IOException
-
read
public static Object read(DataInputStream in, Class type) throws IOException, DeserializationException- Throws:
IOExceptionDeserializationException
-
read
public static Object read(DataInputStream in, Class type, PrototypeFactory pf) throws IOException, DeserializationException- Throws:
IOExceptionDeserializationException
-
read
public static Object read(DataInputStream in, ExternalizableWrapper ew) throws IOException, DeserializationException- Throws:
IOExceptionDeserializationException
-
read
public static Object read(DataInputStream in, ExternalizableWrapper ew, PrototypeFactory pf) throws IOException, DeserializationException- Throws:
IOExceptionDeserializationException
-
readNumeric
- Throws:
IOException
-
readNumeric
- Throws:
IOException
-
readInt
- Throws:
IOException
-
readShort
- Throws:
IOException
-
readByte
- Throws:
IOException
-
readChar
- Throws:
IOException
-
readDecimal
- Throws:
IOException
-
readBool
- Throws:
IOException
-
readString
- Throws:
IOException
-
readDate
- Throws:
IOException
-
readBytes
- Throws:
IOException
-
readInts
- Throws:
IOException
-
readAttributes
public static List<TreeElement> readAttributes(DataInputStream in, TreeElement parent) throws IOException- Throws:
IOException
-
toInt
public static int toInt(long l) -
toShort
public static short toShort(long l) -
toByte
public static byte toByte(long l) -
toLong
-
nullIfEmpty
public static byte[] nullIfEmpty(byte[] ba) -
nullIfEmpty
-
nullIfEmpty
-
nullIfEmpty
-
emptyIfNull
public static byte[] emptyIfNull(byte[] ba) -
emptyIfNull
-
emptyIfNull
-
emptyIfNull
-
unwrap
-
equals
-
listEquals
-
arrayEquals
-
hashMapEquals
-
printBytes
-
deserialize
public static void deserialize(byte[] data, Externalizable ext) throws IOException, DeserializationException- Throws:
IOExceptionDeserializationException
-
deserialize
public static Object deserialize(byte[] data, Class type, PrototypeFactory pf) throws IOException, DeserializationException- Throws:
IOExceptionDeserializationException
-
attachCacheTable
-