// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static byte[] getBytes(byte[] buffer, int offset) {
// 	byte[] b = new byte[buffer.length - offset];
// 	System.arraycopy(buffer, offset, b, 0, buffer.length - offset);
// 	return b;
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static int getInt(byte[] buffer, int offset, int length) {
// 	return getInt(getBytes(buffer, offset, length));
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static String getString(byte[] buffer, int offset, int length) {
// 	return getString(getBytes(buffer, offset, length));
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static void write(byte[] data, OutputStream out) throws IOException {
// 	write(data, data.length, out);
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static void writeInt(int data, int length, OutputStream out) throws IOException {
// 	out.write(getBytes(data, new byte[length]), 0, length);
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static void writeString(String data, int length, OutputStream out) throws IOException {
// 	byte[] s = getBytes(data);
// 	byte[] b = new byte[length];
// 	System.arraycopy(s, 0, b, 0, s.length);
// 	out.write(b, 0, length);
// }


import static org.apache.commons.lang3.BooleanUtils.negate;
import static org.rr.mobi4java.ByteUtils.getBytes;
import static org.rr.mobi4java.ByteUtils.getInt;
import static org.rr.mobi4java.ByteUtils.getString;
import static org.rr.mobi4java.ByteUtils.write;
import static org.rr.mobi4java.ByteUtils.writeInt;
import static org.rr.mobi4java.ByteUtils.writeString;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.output.TeeOutputStream;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
		unknown1 = getInt(content, 12, 4);
		unknown2 = getInt(content, 16, 4);
		idxtIndex = getInt(content, 20, 4);
		indexCount = getInt(content, 24, 4); // entries count
		indexEncoding = getInt(content, 28, 4);
		indexLanguage = getInt(content, 32, 4);
		totalIndexCount = getInt(content, 36, 4); // total entries count
		ordtIndex = getInt(content, 40, 4);
		ligtIndex = getInt(content, 44, 4);
		ordtLigtEntriesCount = getInt(content, 48, 4);
		cncxRecordCount = getInt(content, 52, 4);
		/* 60-148: phonetizer */
		unknownIndxHeaderPart = getBytes(content, 56, headerLength - 56);
		
		int ordtType = getInt(content, 164, 4);
		int ordtEntriesCount = getInt(content, 168, 4);
		int ordt1Offset = getInt(content, 172, 4);
		int ordt2Offset = getInt(content, 176, 4);
		int entrySize = ordtType == 0 ? 1 : 2;
		
		int tagxIndex = getInt(content, 180, 4);
		int tagxNameLength = getInt(content, 184, 4);
		if(tagxIndex > 0) {
			tagx = new MobiContentTagx(getBytes(content, tagxIndex));
			List<MobiContentTagEntry> tags = tagx.getTags();
			for (MobiContentTagEntry tag : tags) {
				int value = tag.getControlByte() & tag.getBitmask();
			}
			
			
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static byte[] getBytes(byte[] buffer, int offset) {
// 	byte[] b = new byte[buffer.length - offset];
// 	System.arraycopy(buffer, offset, b, 0, buffer.length - offset);
// 	return b;
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static int getInt(byte[] buffer, int offset, int length) {
// 	return getInt(getBytes(buffer, offset, length));
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static String getString(byte[] buffer, int offset, int length) {
// 	return getString(getBytes(buffer, offset, length));
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static void write(byte[] data, OutputStream out) throws IOException {
// 	write(data, data.length, out);
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static void writeInt(int data, int length, OutputStream out) throws IOException {
// 	out.write(getBytes(data, new byte[length]), 0, length);
// }
// 
// Path: src/main/java/org/rr/mobi4java/ByteUtils.java
// public static void writeString(String data, int length, OutputStream out) throws IOException {
// 	byte[] s = getBytes(data);
// 	byte[] b = new byte[length];
// 	System.arraycopy(s, 0, b, 0, s.length);
// 	out.write(b, 0, length);
// }


// Path: src/main/java/org/rr/mobi4java/MobiContentIndex.java
import static org.apache.commons.lang3.BooleanUtils.negate;
import static org.rr.mobi4java.ByteUtils.getBytes;
import static org.rr.mobi4java.ByteUtils.getInt;
import static org.rr.mobi4java.ByteUtils.getString;
import static org.rr.mobi4java.ByteUtils.write;
import static org.rr.mobi4java.ByteUtils.writeInt;
import static org.rr.mobi4java.ByteUtils.writeString;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.output.TeeOutputStream;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;

		unknown1 = getInt(content, 12, 4);
		unknown2 = getInt(content, 16, 4);
		idxtIndex = getInt(content, 20, 4);
		indexCount = getInt(content, 24, 4); // entries count
		indexEncoding = getInt(content, 28, 4);
		indexLanguage = getInt(content, 32, 4);
		totalIndexCount = getInt(content, 36, 4); // total entries count
		ordtIndex = getInt(content, 40, 4);
		ligtIndex = getInt(content, 44, 4);
		ordtLigtEntriesCount = getInt(content, 48, 4);
		cncxRecordCount = getInt(content, 52, 4);
		/* 60-148: phonetizer */
		unknownIndxHeaderPart = getBytes(content, 56, headerLength - 56);
		
		int ordtType = getInt(content, 164, 4);
		int ordtEntriesCount = getInt(content, 168, 4);
		int ordt1Offset = getInt(content, 172, 4);
		int ordt2Offset = getInt(content, 176, 4);
		int entrySize = ordtType == 0 ? 1 : 2;
		
		int tagxIndex = getInt(content, 180, 4);
		int tagxNameLength = getInt(content, 184, 4);
		if(tagxIndex > 0) {
			tagx = new MobiContentTagx(getBytes(content, tagxIndex));
			List<MobiContentTagEntry> tags = tagx.getTags();
			for (MobiContentTagEntry tag : tags) {
				int value = tag.getControlByte() & tag.getBitmask();
			}
			
			
			MobiContentIdxt idxt = new MobiContentIdxt(getBytes(content, idxtIndex), indexCount);