MCPcopy Create free account
hub / github.com/cschanck/single-file-java / verifyHeader

Method verifyHeader

src/main/java/org/sfj/ChiseledMap.java:199–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197 }
198
199 private void verifyHeader() throws IOException {
200 ByteBuffer p = ByteBuffer.allocate(HDR.length);
201 readFully(0, p);
202 p.clear();
203 if (p.compareTo(ByteBuffer.wrap(HDR)) != 0) {
204 throw new IOException("File Header Mismatch!");
205 }
206 }
207
208 private void writeHeader() throws IOException {
209 // write at the beginning, then leave position alone

Callers 1

ChiseledMapMethod · 0.95

Calls 3

readFullyMethod · 0.95
clearMethod · 0.45
compareToMethod · 0.45

Tested by

no test coverage detected