/** * Constructor. * * @param root is the ATerm that needs to be serialized. */ public BinaryWriter(final ATerm root) { super(); _sharedTerms = new HashMap<>(); _currentKey = 0; _applSignatures = new HashMap<>(); _sigKey = 0; _stack = new ATermMapping[STACKSIZE]; _stackPosition = 0; final ATermMapping tm = new ATermMapping(root); _stack[_stackPosition] = tm; _currentTerm = root; _indexInTerm = 0; _tempNameWriteBuffer = null; }
final ATermMapping child = new ATermMapping(next); _stack[++_stackPosition] = child;