public class DwgFileVR2004Reader extends java.lang.Object implements IDwgFileReader
| Modifier and Type | Field and Description |
|---|---|
protected java.nio.ByteBuffer |
bb |
protected DwgFile |
dwgFile |
| Constructor and Description |
|---|
DwgFileVR2004Reader() |
| Modifier and Type | Method and Description |
|---|---|
void |
read(DwgFile dwgFile,
java.nio.ByteBuffer bb)
Reads the DWG version 2004 format
|
protected java.nio.ByteBuffer |
readCompressedSection(java.nio.ByteBuffer bb,
int compressedSize,
int decompressedSize,
int checksum) |
protected void |
readDwgR2004FileHeader(java.nio.ByteBuffer bb)
This function reads the header section of the file, with the encrypted
data
|
protected void |
readDwgR2004InfoSection(java.nio.ByteBuffer bb) |
protected DwgObject |
readDwgR2004Object(java.nio.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(java.nio.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 java.nio.ByteBuffer |
readSection(java.nio.ByteBuffer bb,
java.lang.String name) |
protected java.nio.ByteBuffer |
readSystemSection(java.nio.ByteBuffer bb) |
protected DwgFile dwgFile
protected java.nio.ByteBuffer bb
public void read(DwgFile dwgFile, java.nio.ByteBuffer bb) throws java.io.IOException
read in interface IDwgFileReaderdwgFile - Represents the DWG file that we want to readbb - Memory mapped byte buffer of the whole DWG filejava.io.IOException - When DWG file path is wrongprotected void readDwgR2004InfoSection(java.nio.ByteBuffer bb)
protected void readDwgR2004FileHeader(java.nio.ByteBuffer bb)
bb - ByteBuffer containing the opened DWG fileprotected java.nio.ByteBuffer readSection(java.nio.ByteBuffer bb,
java.lang.String name)
ByteBuffer - Containing the opened dwg filecompressedSize - size of the compressed datadecompressedSize - size of the decompressed dataCheckSum - protected void readDwgR2004Objects()
protected DwgObject readDwgR2004Object(java.nio.ByteBuffer bb, int offset, int index)
offset - Object's addressindex - object identifierprotected void readDwgR2004SectionMap(java.nio.ByteBuffer bb)
protected java.nio.ByteBuffer readSystemSection(java.nio.ByteBuffer bb)
ByteBuffer - containing the dwg opened fileprotected java.nio.ByteBuffer readCompressedSection(java.nio.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 java.lang.RuntimeException,
CorruptedDwgEntityException
IDwgFileReaderreadObjectHeader in interface IDwgFileReaderjava.lang.RuntimeExceptionCorruptedDwgEntityExceptionpublic int readObjectTailer(int[] data,
int offset,
DwgObject dwgObject)
throws java.lang.RuntimeException,
CorruptedDwgEntityException
IDwgFileReaderreadObjectTailer in interface IDwgFileReaderjava.lang.RuntimeExceptionCorruptedDwgEntityException