Debian Codegraph @

src/uk/me/parabola/imgfmt/mps/MapsetBlock.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2007 Steve Ratcliffe
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 *
14 * Author: Steve Ratcliffe
15 * Create date: Dec 19, 2007
16 */
17 package uk.me.parabola.imgfmt.mps;
18
19 import uk.me.parabola.io.StructuredOutputStream;
20
21 import java.io.IOException;
22
23 /**
24 * Block describing the map set.
25 *
26 * @author Steve Ratcliffe
27 */
28 public class MapsetBlock extends MpsBlock {
29 private static final int BLOCK_TYPE = 0x56;
30
31 private String name = "OSM map set";
32
33 public MapsetBlock() {
34 super(BLOCK_TYPE, 0);
35 }
36
37 protected void writeBody(StructuredOutputStream out) throws IOException {
38 out.writeString(name);
39 out.write(0); // unknown
40 }
41
42 public void setName(String name) {
43 if (name != null)
44 this.name = name;
45 }
46 }