Ejemplo n.º 1
0
 @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);
 }
Ejemplo n.º 2
0
 @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);
 }