public void read ( ) throws IOException { System . out . println ( "DwgFile.read() executed ..." ) ; setDwgVersion ( ) ; if ( dwgVersion . equals ( "R13" ) ) { dwgReader = new DwgFileV14Reader ( ) ; dwgReader . read ( this ) ; } else if ( dwgVersion . equals ( "R14" ) ) { dwgReader = new DwgFileV14Reader ( ) ; dwgReader . read ( this ) ; } else if ( dwgVersion . equals ( "R15" ) ) { dwgReader = new DwgFileV15Reader ( ) ; dwgReader . read ( this ) ; } else if ( dwgVersion . equals ( "Unknown" ) ) { throw new IOException ( "DWG version of the file is not supported." ) ; } }
Reads a DWG file and put its objects in the dwgObjects Vector This method is version independent