dos.writeInt(encodedBasicSettings.length - checksumLength);
byte[] bufToWrite = baos.toByteArray();
baos = new ByteArrayOutputStream();
dos = new DataOutputStream(baos);
dos.writeInt(0); // flags
dos.writeShort(checksumChecker.getChecksumTypeID());
dos.writeInt(VERSION);
byte[] version = baos.toByteArray();
byte[] bufToChecksum = Arrays.copyOf(bufToWrite, bufToWrite.length+version.length);
System.arraycopy(version, 0, bufToChecksum, bufToWrite.length, version.length);
byte[] checksum =