コード例 #1
0
ファイル: Area.java プロジェクト: route-a-lot/route-a-lot
 @Override
 protected void load(MappedByteBuffer mmap) throws IOException {
   String name = Util.readUTFString(mmap);
   this.name = EMPTY.equals(name) ? null : name;
   int len = mmap.getInt();
   this.nodes = new Node[len];
   MapInfo mapInfo = State.getInstance().getMapInfo();
   for (int i = 0; i < len; i++) {
     this.nodes[i] = mapInfo.getNode(mmap.getInt());
   }
   this.wayInfo = WayInfo.loadFromInput(mmap);
 }
コード例 #2
0
ファイル: Area.java プロジェクト: route-a-lot/route-a-lot
 @Override
 protected void load(DataInput input) throws IOException {
   String name = input.readUTF();
   this.name = EMPTY.equals(name) ? null : name;
   int len = input.readInt();
   this.nodes = new Node[len];
   MapInfo mapInfo = State.getInstance().getMapInfo();
   for (int i = 0; i < len; i++) {
     this.nodes[i] = mapInfo.getNode(input.readInt());
   }
   this.wayInfo = WayInfo.loadFromInput(input);
 }