Package convex.core.data
Interface IWriteable
- All Known Implementing Classes:
AArrayBlob
,ABlob
,ABlobLike
,ABlobMap
,AccountKey
,AccountStatus
,ACell
,AClosure
,ACollection
,ACountable
,ADataFn
,ADataStructure
,Address
,AFn
,AHashMap
,AHashSet
,AInteger
,AList
,ALongBlob
,AMap
,AMapEntry
,AMultiOp
,ANumeric
,AOp
,APrimitive
,ARecord
,ARecordGeneric
,ASequence
,ASet
,ASignature
,AString
,ASymbolic
,ATransaction
,AVector
,Belief
,Blob
,BlobMap
,BlobTree
,Block
,BlockResult
,Call
,Cond
,Constant
,CoreFn
,CorePred
,CVMBigInteger
,CVMBool
,CVMChar
,CVMDouble
,CVMLong
,Def
,Do
,Ed25519Signature
,Fn
,Hash
,Invoke
,Invoke
,Keyword
,KeywordFn
,Lambda
,Let
,List
,Local
,LongBlob
,Lookup
,MapEntry
,MapFn
,MapLeaf
,MapTree
,Multi
,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 TypeMethodDescriptionint
encode
(byte[] bs, int pos) Writes this object to a byte array including an appropriate message tagint
Estimate 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.
-