Package convex.core.data
Interface IWriteable
- All Known Implementing Classes:
AArrayBlob,ABlob,ABlobMap,AccountKey,AccountStatus,ACell,AClosure,ACollection,ACountable,ADataFn,ADataStructure,Address,AFn,AHashMap,AHashSet,AList,ALongBlob,AMap,AMapEntry,AMultiOp,AOp,APrimitive,ARecord,ARecordGeneric,ASequence,ASet,ASignature,AString,ASymbolic,ATransaction,AVector,Belief,Blob,BlobMap,BlobTree,Block,BlockResult,Call,Cond,Constant,CoreFn,CorePred,CVMBool,CVMByte,CVMChar,CVMDouble,CVMLong,Def,Do,Ed25519Signature,Fn,Hash,Invoke,Invoke,Keyword,KeywordFn,Lambda,Let,List,Local,LongBlob,Lookup,MapEntry,MapFn,MapLeaf,MapTree,MultiFn,Order,PeerStatus,Query,Ref,RefDirect,RefSoft,Result,SeqFn,Set,SetFn,SetLeaf,SetTree,SignedData,Special,State,StringShort,StringSlice,StringTree,Symbol,Syntax,Transfer,VectorArray,VectorLeaf,VectorTree
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.write(ByteBuffer bb) Writes this object to a ByteBuffer including an appropriate message tag
-
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
-
write
Writes this object to a ByteBuffer including an appropriate message tag- Parameters:
bb- ByteBuffer to write to- Returns:
- The updated ByteBuffer
-
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 likely to contain the entire object when represented in binary format, including the tag byte.- Returns:
- The estimated size for the binary representation of this object.
-