Class ExtWrapIntEncodingSmall
java.lang.Object
org.javarosa.core.util.externalizable.ExternalizableWrapper
org.javarosa.core.util.externalizable.ExtWrapIntEncoding
org.javarosa.core.util.externalizable.ExtWrapIntEncodingSmall
- All Implemented Interfaces:
Externalizable
public class ExtWrapIntEncodingSmall extends ExtWrapIntEncoding
-
Field Summary
Fields Modifier and Type Field Description intbiasstatic intDEFAULT_BIAS -
Constructor Summary
Constructors Constructor Description ExtWrapIntEncodingSmall()ExtWrapIntEncodingSmall(long l)ExtWrapIntEncodingSmall(long l, int bias)ExtWrapIntEncodingSmall(Object ignore, int bias) -
Method Summary
Modifier and Type Method Description ExternalizableWrapperclone(Object val)voidmetaReadExternal(DataInputStream in, PrototypeFactory pf)voidmetaWriteExternal(DataOutputStream out)voidreadExternal(DataInputStream in, PrototypeFactory pf)voidwriteExternal(DataOutputStream out)serialize a numeric value, only using as many bytes as needed.Methods inherited from class org.javarosa.core.util.externalizable.ExternalizableWrapper
baseValue, isEmpty
-
Field Details
-
DEFAULT_BIAS
public static final int DEFAULT_BIAS- See Also:
- Constant Field Values
-
bias
public int bias
-
-
Constructor Details
-
ExtWrapIntEncodingSmall
public ExtWrapIntEncodingSmall(long l) -
ExtWrapIntEncodingSmall
public ExtWrapIntEncodingSmall(long l, int bias) -
ExtWrapIntEncodingSmall
public ExtWrapIntEncodingSmall() -
ExtWrapIntEncodingSmall
-
-
Method Details
-
clone
- Specified by:
clonein classExternalizableWrapper
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Specified by:
readExternalin classExternalizableWrapper- Throws:
IOException
-
writeExternal
serialize a numeric value, only using as many bytes as needed. splits up the value into chunks of 7 bits, using as many chunks as needed to unambiguously represent the value. each chunk is serialized as a single byte, where the most-significant bit is set to 1 to indicate there are more bytes to follow, or 0 to indicate the last byte- Specified by:
writeExternalin interfaceExternalizable- Specified by:
writeExternalin classExternalizableWrapper- Throws:
IOException
-
metaReadExternal
- Specified by:
metaReadExternalin classExternalizableWrapper- Throws:
IOException
-
metaWriteExternal
- Specified by:
metaWriteExternalin classExternalizableWrapper- Throws:
IOException
-