com.onespatial.dwglib.objects.CadObject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dwg-lib Show documentation
Show all versions of dwg-lib Show documentation
dwg-lib is a Java library for reading AutoCad files version 2010 and later
The newest version!
package com.onespatial.dwglib.objects;
import java.io.UnsupportedEncodingException;
import java.util.AbstractList;
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Stack;
import com.onespatial.dwglib.FileVersion;
import com.onespatial.dwglib.bitstreams.BitBuffer;
import com.onespatial.dwglib.bitstreams.Handle;
import com.onespatial.dwglib.bitstreams.Point3D;
public abstract class CadObject {
protected final ObjectMap objectMap;
public Handle handleOfThisObject;
// Defined in this class but always set in derived classes
protected Handle[] reactorHandles;
private List genericHandles = new ArrayList<>();
private Map extendedEntityData = new HashMap<>();
// Defined in this class but always set in derived classes
protected Handle xdicobjhandle;
public CadObject(ObjectMap objectMap) {
this.objectMap = objectMap;
}
public void readFromStreams(BitBuffer dataStream, BitBuffer stringStream, BitBuffer handleStream,
FileVersion fileVersion) {
handleOfThisObject = dataStream.getHandle();
// Page 254 Chapter 27 Extended Entity Data
int sizeOfExtendedObjectData = dataStream.getBS();
while (sizeOfExtendedObjectData != 0) {
Handle appHandle = dataStream.getHandle();
List