16 |
this.version = version; |
this.version = version; |
17 |
} |
} |
18 |
|
|
19 |
|
public VersionBlock(Block block, VersionFormat format) throws IOException { |
20 |
|
super(block.getHeader(), format); |
21 |
|
InputStream in = block.getInputStream(); |
22 |
|
this.version = format.readVersion(in); |
23 |
|
in.close(); |
24 |
|
} |
25 |
|
|
26 |
public void writeTo(OutputStream out) throws IOException { |
public void writeTo(OutputStream out) throws IOException { |
27 |
header.writeTo(out); |
header.writeTo(out); |
28 |
format.writeVersion(out, version); |
format.writeVersion(out, version); |