public class DwgFileVR2004Reader extends Object implements IDwgFileReader
| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
bb |
protected DwgFile |
dwgFile |
| Constructor and Description |
|---|
DwgFileVR2004Reader() |
| Modifier and Type | Method and Description |
|---|---|
void |
read(DwgFile dwgFile,
ByteBuffer bb)
Reads the DWG version 2004 format
|
protected ByteBuffer |
readCompressedSection(ByteBuffer bb,
int compressedSize,
int decompressedSize,
int checksum) |
protected void |
readDwgR2004FileHeader(ByteBuffer bb)
This function reads the header section of the file, with the encrypted
data
|
protected void |
readDwgR2004InfoSection(ByteBuffer bb) |
protected DwgObject |
readDwgR2004Object(ByteBuffer bb,
int offset,
int index)
Read commun parameters for an Object
|
protected void |
readDwgR2004Objects()
Reads all the object referenced in the object map section of the DWG file
(using their object file obsets)
|
protected void |
readDwgR2004SectionMap(ByteBuffer bb)
Reads the Section Map and fills the Sections Array with the sections
found
|
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 ByteBuffer |
readSection(ByteBuffer bb,
String name) |
protected ByteBuffer |
readSystemSection(ByteBuffer bb) |
protected DwgFile dwgFile
protected ByteBuffer bb
public void read(DwgFile dwgFile, ByteBuffer bb) throws IOException
read in interface IDwgFileReaderdwgFile - 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 readDwgR2004InfoSection(ByteBuffer bb)
protected void readDwgR2004FileHeader(ByteBuffer bb)
bb - ByteBuffer containing the opened DWG fileprotected ByteBuffer readSection(ByteBuffer bb, String name)
ByteBuffer - Containing the opened dwg filecompressedSize - size of the compressed datadecompressedSize - size of the decompressed dataCheckSum - protected void readDwgR2004Objects()
protected DwgObject readDwgR2004Object(ByteBuffer bb, int offset, int index)
offset - Object's addressindex - object identifierprotected void readDwgR2004SectionMap(ByteBuffer bb)
protected ByteBuffer readSystemSection(ByteBuffer bb)
ByteBuffer - containing the dwg opened fileprotected ByteBuffer readCompressedSection(ByteBuffer bb, int compressedSize, int decompressedSize, int checksum)
ByteBuffer - Containing the opend dwg filecompressedSize - size of the compressed datadecompressedSize - size of the decompressed dataCheckSum - public int readObjectHeader(int[] data,
int offset,
DwgObject dwgObject)
throws RuntimeException,
CorruptedDwgEntityException
IDwgFileReaderreadObjectHeader in interface IDwgFileReaderRuntimeExceptionCorruptedDwgEntityExceptionpublic int readObjectTailer(int[] data,
int offset,
DwgObject dwgObject)
throws RuntimeException,
CorruptedDwgEntityException
IDwgFileReaderreadObjectTailer in interface IDwgFileReaderRuntimeExceptionCorruptedDwgEntityException