public class DwgFileV14Reader extends Object implements IDwgFileReader
Modifier and Type | Field and Description |
---|---|
protected ByteBuffer |
bb |
protected DwgFile |
dwgFile |
Constructor and Description |
---|
DwgFileV14Reader() |
Modifier and Type | Method and Description |
---|---|
DwgObject |
getDwgObjectByIndex(int index)
Return a dwg object from its index in the dwg file
|
void |
read(DwgFile dwgFile,
ByteBuffer bb)
Reads the DWG version 15 format
|
protected void |
readDwgClasses() |
protected DwgObject |
readDwgObject(int offset,
int index)
Reads a dwg drawing entity (dwg object) given its offset in the file
|
protected void |
readDwgObjectOffsets() |
protected void |
readDwgObjects()
Reads all the object referenced in the object map section of the DWG file
(using their object file obsets)
|
protected void |
readDwgSectionOffsets()
It read the SECTIONS from the header of the DWG file
TODO Mover esto a una clase abstracta Reader, pues es similar para DWG 15
(o hacer que esta herede de DWG 15)
|
protected void |
readHeaders()
It reads all HEADER section of a DWG 13-14 file.
|
int |
readObjectHeader(int[] data,
int offset,
DwgObject dwgObject)
Reads the header of a dwg object
|
int |
readObjectTailer(int[] data,
int offset,
DwgObject dwgObject)
Reads the tailer of a dwg object.
|
protected void |
readSpecificObject(DwgObject obj,
int[] data,
int bitPos) |
protected DwgFile dwgFile
protected ByteBuffer bb
public void read(DwgFile dwgFile, ByteBuffer bb) throws IOException
read
in interface IDwgFileReader
dwgFile
- Represents the DWG file that we want to readbb
- Memory mapped byte buffer of the whole DWG fileIOException
- When DWG file path is wrongprotected void readHeaders()
protected void readDwgSectionOffsets()
protected void readDwgObjects()
public DwgObject getDwgObjectByIndex(int index)
index
- of the requested dwg object in the dwg fileprotected DwgObject readDwgObject(int offset, int index)
offset
- offset of the dwg object in the fileindex
- order of the entity in the objects map (1, 2, etc.)protected void readSpecificObject(DwgObject obj, int[] data, int bitPos) throws Exception
Exception
public int readObjectHeader(int[] data, int offset, DwgObject dwgObject)
IDwgFileReader
readObjectHeader
in interface IDwgFileReader
public int readObjectTailer(int[] data, int offset, DwgObject dwgObject) throws RuntimeException, CorruptedDwgEntityException
IDwgFileReader
readObjectTailer
in interface IDwgFileReader
RuntimeException
CorruptedDwgEntityException