Package org.gvsig.dwg.lib.readers
Class DwgFileV14Reader
java.lang.Object
org.gvsig.dwg.lib.readers.DwgFileV14Reader
- All Implemented Interfaces:
IDwgFileReader
The DwgFileV14Reader reads the DWG version 14 format
- Author:
- jmorell
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDwgObjectByIndex(int index) Return a dwg object from its index in the dwg filevoidread(DwgFile dwgFile, ByteBuffer bb) Reads the DWG version 15 formatprotected voidprotected DwgObjectreadDwgObject(int offset, int index) Reads a dwg drawing entity (dwg object) given its offset in the fileprotected voidprotected voidReads all the object referenced in the object map section of the DWG file (using their object file obsets)protected voidIt 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 voidIt reads all HEADER section of a DWG 13-14 file.intreadObjectHeader(int[] data, int offset, DwgObject dwgObject) Reads the header of a dwg objectintreadObjectTailer(int[] data, int offset, DwgObject dwgObject) Reads the tailer of a dwg object.protected voidreadSpecificObject(DwgObject obj, int[] data, int bitPos)
-
Field Details
-
dwgFile
-
bb
-
-
Constructor Details
-
DwgFileV14Reader
public DwgFileV14Reader()
-
-
Method Details
-
read
Reads the DWG version 15 format- Specified by:
readin interfaceIDwgFileReader- Parameters:
dwgFile- Represents the DWG file that we want to readbb- Memory mapped byte buffer of the whole DWG file- Throws:
IOException- When DWG file path is wrong
-
readHeaders
protected void readHeaders()It reads all HEADER section of a DWG 13-14 file. This method must be called only for debug purposes because we dont the meaning (or the practical application) of the fields readed with it TODO Pasarlo a la clase abstracta comun que se haga de las versiones 15, 13-14 (la cabecera es la misma practicamente) -
readDwgSectionOffsets
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) -
readDwgObjectOffsets
- Throws:
Exception
-
readDwgClasses
- Throws:
Exception
-
readDwgObjects
protected void readDwgObjects()Reads all the object referenced in the object map section of the DWG file (using their object file obsets) -
getDwgObjectByIndex
Return a dwg object from its index in the dwg file- Parameters:
index- of the requested dwg object in the dwg file
-
readDwgObject
Reads a dwg drawing entity (dwg object) given its offset in the file- Parameters:
offset- offset of the dwg object in the fileindex- order of the entity in the objects map (1, 2, etc.)
-
readSpecificObject
- Throws:
Exception
-
readObjectHeader
Description copied from interface:IDwgFileReaderReads the header of a dwg object- Specified by:
readObjectHeaderin interfaceIDwgFileReader
-
readObjectTailer
public int readObjectTailer(int[] data, int offset, DwgObject dwgObject) throws RuntimeException, CorruptedDwgEntityException Description copied from interface:IDwgFileReaderReads the tailer of a dwg object.- Specified by:
readObjectTailerin interfaceIDwgFileReader- Throws:
RuntimeExceptionCorruptedDwgEntityException
-