All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.onespatial.dwglib.objects.AcdbDictionaryWithDefault Maven / Gradle / Ivy

Go to download

dwg-lib is a Java library for reading AutoCad files version 2010 and later

The newest version!
package com.onespatial.dwglib.objects;

import com.onespatial.dwglib.FileVersion;
import com.onespatial.dwglib.bitstreams.BitBuffer;
import com.onespatial.dwglib.bitstreams.Handle;

public class AcdbDictionaryWithDefault extends Dictionary {

    private Handle defaultEntryHandle;

    public AcdbDictionaryWithDefault(ObjectMap objectMap) {
        super(objectMap);
    }
    
    @Override
    public void readObjectTypeSpecificData(BitBuffer dataStream, BitBuffer stringStream, BitBuffer handleStream, FileVersion fileVersion) {
        // 19.4.43 ACDBDICTIONARYWDFLT page 146

        super.readCommonDictionaryData(dataStream, stringStream, handleStream);

        defaultEntryHandle = handleStream.getHandle();
        
        handleStream.advanceToByteBoundary();

        dataStream.assertEndOfStream();
        stringStream.assertEndOfStream();
        handleStream.assertEndOfStream();
    }

    public CadObject getDefaultEntry() {
        CadObject result = objectMap.parseObject(defaultEntryHandle);
        return (CadObject) result;
    }

	public String toString() {
		return "ACDBDICTIONARYWDFLT";
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy