MCPcopy Index your code
hub / github.com/boazy/TWEditorEnhanced / readHeader

Method readHeader

src/main/java/StringsDatabase.java:30–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 }
29
30 private void readHeader()
31 throws DBException, IOException
32 {
33 byte[] buffer = new byte[20];
34 int count = this.in.read(buffer);
35 if (count != buffer.length) {
36 throw new DBException("TLK header truncated");
37 }
38 String type = new String(buffer, 0, 4);
39 String version = new String(buffer, 4, 4);
40 if (!type.equals("TLK ")) {
41 throw new DBException(new StringBuilder().append("File type '").append(type).append("' is not supported").toString());
42 }
43 if (!version.equals("V3.0")) {
44 throw new DBException(new StringBuilder().append("File version '").append(version).append("' is not supported").toString());
45 }
46 this.languageID = getInteger(buffer, 8);
47 this.stringCount = getInteger(buffer, 12);
48 this.entryOffset = 20;
49 this.stringOffset = getInteger(buffer, 16);
50 }
51
52 public String getName()
53 {

Callers 1

StringsDatabaseMethod · 0.95

Calls 4

getIntegerMethod · 0.95
readMethod · 0.45
equalsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected