public void read(ByteBuffer file, boolean strict) throws java.io.IOException { file.order(ByteOrder.BIG_ENDIAN); fileCode = file.getInt(); checkMagic(strict); // skip 5 ints... file.position(file.position() + 20); fileLength = file.getInt(); file.order(ByteOrder.LITTLE_ENDIAN); version = file.getInt(); checkVersion(strict); shapeType = ShapeType.forID(file.getInt()); minX = file.getDouble(); minY = file.getDouble(); maxX = file.getDouble(); maxY = file.getDouble(); // skip remaining unused bytes file.order(ByteOrder.BIG_ENDIAN); // well they may not be unused // forever... file.position(file.position() + 32); }
public void read(ByteBuffer file, boolean strict) throws java.io.IOException { file.order(ByteOrder.BIG_ENDIAN); fileCode = file.getInt(); checkMagic(strict); // skip 5 ints... file.position(file.position() + 20); fileLength = file.getInt(); file.order(ByteOrder.LITTLE_ENDIAN); version = file.getInt(); checkVersion(strict); shapeType = ShapeType.forID(file.getInt()); minX = file.getDouble(); minY = file.getDouble(); maxX = file.getDouble(); maxY = file.getDouble(); // skip remaining unused bytes file.order(ByteOrder.BIG_ENDIAN);// well they may not be unused // forever... file.position(file.position() + 32); }
public void read(ByteBuffer file,boolean strict) throws java.io.IOException { file.order(ByteOrder.BIG_ENDIAN); fileCode = file.getInt(); checkMagic(strict); // skip 5 ints... file.position(file.position() + 20); fileLength = file.getInt(); file.order(ByteOrder.LITTLE_ENDIAN); version = file.getInt(); checkVersion(strict); shapeType = ShapeType.forID(file.getInt()); minX = file.getDouble(); minY = file.getDouble(); maxX = file.getDouble(); maxY = file.getDouble(); //skip remaining unused bytes file.order(ByteOrder.BIG_ENDIAN);//well they may not be unused forever... file.position(file.position() + 32); }
public void read(ByteBuffer file, boolean strict) throws java.io.IOException { file.order(ByteOrder.BIG_ENDIAN); fileCode = file.getInt(); checkMagic(strict); // skip 5 ints... file.position(file.position() + 20); fileLength = file.getInt(); file.order(ByteOrder.LITTLE_ENDIAN); version = file.getInt(); checkVersion(strict); shapeType = ShapeType.forID(file.getInt()); minX = file.getDouble(); minY = file.getDouble(); maxX = file.getDouble(); maxY = file.getDouble(); // skip remaining unused bytes file.order(ByteOrder.BIG_ENDIAN);// well they may not be unused // forever... file.position(file.position() + 32); }