use of de.topobyte.osm4j.pbf.util.BlobHeader in project osm4j-pbf by topobyte.
the class CopyBlockwise method copyAllBlocks.
private static void copyAllBlocks() throws IOException {
while (true) {
try {
BlobHeader header = PbfUtil.parseHeader(data);
Fileformat.Blob blob = PbfUtil.parseBlock(data, header.getDataLength());
blockWriter.write(header.getType(), null, blob);
} catch (EOFException eof) {
break;
}
}
}
use of de.topobyte.osm4j.pbf.util.BlobHeader in project osm4j-pbf by topobyte.
the class CopyBlockwise method copyBlocks.
private static void copyBlocks(int nBlocks) throws IOException {
for (int i = 0; i < nBlocks; i++) {
try {
BlobHeader header = PbfUtil.parseHeader(data);
Fileformat.Blob blob = PbfUtil.parseBlock(data, header.getDataLength());
blockWriter.write(header.getType(), null, blob);
} catch (EOFException eof) {
break;
}
}
}
Aggregations