Package convex.core.data
Interface IWriteable
- All Known Implementing Classes:
AArrayBlob,ABlob,ABlobLike,AccountKey,AccountStatus,ACell,AClosure,ACollection,ACountable,ADataFn,ADataStructure,Address,ADerivedBlob,ADerivedSet,AFn,AHashMap,AHashSet,AIndex,AInteger,AList,ALongBlob,AMap,AMapEntry,AMultiOp,ANumeric,AOp,APrimitive,ARecord,ARecordGeneric,ASequence,ASet,ASignature,ASpecialVector,AString,ASymbolic,ATransaction,AVector,Belief,Blob,BlobTree,Block,BlockResult,Call,Cond,Constant,CoreFn,CorePred,CVMBigInteger,CVMBool,CVMChar,CVMDouble,CVMLong,Def,Do,Ed25519Signature,Fn,Hash,Index,Invoke,Invoke,KeySet,Keyword,KeywordFn,Lambda,Let,List,Local,LongBlob,Lookup,MapEntry,MapFn,MapLeaf,MapTree,Multi,MultiFn,Order,PeerStatus,Query,Receipt,Ref,RefDirect,RefSoft,Result,SeqFn,Set,SetFn,SetLeaf,SetTree,SignedData,Special,State,StringShort,StringSlice,StringTree,Symbol,Syntax,Transfer,VectorArray,VectorLeaf,VectorTree,ZeroBlob
public interface IWriteable
-
Method Summary
Modifier and TypeMethodDescriptionintencode(byte[] bs, int pos) Writes this object to a byte array including an appropriate message tagintEstimate the encoded data size for this Cell.
-
Method Details
-
encode
int encode(byte[] bs, int pos) Writes this object to a byte array including an appropriate message tag- Parameters:
bs- byte array to write this object topos- position at which to write the value- Returns:
- The updated position
-
estimatedEncodingSize
int estimatedEncodingSize()Estimate the encoded data size for this Cell. Used for quickly sizing buffers. Implementations should try to return a size that is highly likely to contain the entire object when encoded, including the tag byte. Should not traverse soft Refs, i.e. must be usable on arbitrary partial data structures- Returns:
- The estimated size for the binary representation of this object.
-