datasource v1 mapping decode cleanup
This commit is contained in:
+3
-7
@@ -166,8 +166,7 @@ public class FullDataSourceV1
|
||||
this.setDataPoints(dataPoints);
|
||||
|
||||
|
||||
FullDataPointIdMap mapping = this.readIdMappings(inputStream, level.getLevelWrapper());
|
||||
this.setIdMapping(mapping);
|
||||
this.readIdMappings(this.mapping, inputStream, level.getLevelWrapper());
|
||||
|
||||
}
|
||||
|
||||
@@ -347,7 +346,7 @@ public class FullDataSourceV1
|
||||
outputStream.writeInt(DATA_GUARD_BYTE);
|
||||
this.mapping.serialize(outputStream);
|
||||
}
|
||||
public FullDataPointIdMap readIdMappings(DhDataInputStream inputStream, ILevelWrapper levelWrapper) throws IOException, InterruptedException, DataCorruptedException
|
||||
public void readIdMappings(FullDataPointIdMap map, DhDataInputStream inputStream, ILevelWrapper levelWrapper) throws IOException, InterruptedException, DataCorruptedException
|
||||
{
|
||||
int guardByte = inputStream.readInt();
|
||||
if (guardByte != DATA_GUARD_BYTE)
|
||||
@@ -355,11 +354,8 @@ public class FullDataSourceV1
|
||||
throw new IOException("Invalid data content end guard for ID mapping");
|
||||
}
|
||||
|
||||
FullDataPointIdMap newMap = new FullDataPointIdMap(this.pos);
|
||||
FullDataPointIdMap.deserialize(newMap, inputStream, this.pos, levelWrapper);
|
||||
return newMap;
|
||||
FullDataPointIdMap.deserialize(map, inputStream, this.pos, levelWrapper);
|
||||
}
|
||||
public void setIdMapping(FullDataPointIdMap mappings) { this.mapping.mergeAndReturnRemappedEntityIds(mappings); }
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user