protected int[][] readIntArray2D(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; int[][] value = new int[length][]; for (int x = 0; x < length; x++) value[x] = readIntArray(content); return value; }
protected byte[] readByteArray(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; byte[] value = new byte[length]; for (int x = 0; x < length; x++) value[x] = readByte(content); return value; }
protected IntIDMap readIntSavableMap(byte[] content) throws IOException { int elements = readInt(content); if (elements == BinaryOutputCapsule.NULL_OBJECT) return null; int[] keys = readIntArray(content); ID[] values = readSavableArray(content); IntIDMap rVal = new IntIDMap(); rVal.keys = keys; rVal.values = values; return rVal; }
protected long[] readLongArray(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; long[] value = new long[length]; for (int x = 0; x < length; x++) value[x] = readLong(content); return value; }
protected long[][] readLongArray2D(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; long[][] value = new long[length][]; for (int x = 0; x < length; x++) value[x] = readLongArray(content); return value; }
protected boolean[] readBooleanArray(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; boolean[] value = new boolean[length]; for (int x = 0; x < length; x++) value[x] = readBoolean(content); return value; }
protected String[] readStringArray(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; String[] value = new String[length]; for (int x = 0; x < length; x++) value[x] = readString(content); return value; }
protected ID[] readSavableArray(byte[] content) throws IOException { int elements = readInt(content); if (elements == BinaryOutputCapsule.NULL_OBJECT) return null; ID[] rVal = new ID[elements]; for (int x = 0; x < elements; x++) { rVal[x] = readSavable(content); } return rVal; }
protected float[] readFloatArray(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; float[] value = new float[length]; for (int x = 0; x < length; x++) value[x] = readFloat(content); return value; }
protected float[][] readFloatArray2D(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; float[][] value = new float[length][]; for (int x = 0; x < length; x++) value[x] = readFloatArray(content); return value; }
protected boolean[][] readBooleanArray2D(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; boolean[][] value = new boolean[length][]; for (int x = 0; x < length; x++) value[x] = readBooleanArray(content); return value; }
protected ArrayList<ByteBuffer> readByteBufferArrayList(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) { return null; } ArrayList<ByteBuffer> rVal = new ArrayList<ByteBuffer>(length); for (int x = 0; x < length; x++) { rVal.add(readByteBuffer(content)); } return rVal; }
protected double[] readDoubleArray(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; double[] value = new double[length]; for (int x = 0; x < length; x++) value[x] = readDouble(content); return value; }
protected ID[][] readSavableMap(byte[] content) throws IOException { int elements = readInt(content); if (elements == BinaryOutputCapsule.NULL_OBJECT) return null; ID[][] rVal = new ID[elements][]; for (int x = 0; x < elements; x++) { rVal[x] = readSavableArray(content); } return rVal; }
protected short[] readShortArray(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; short[] value = new short[length]; for (int x = 0; x < length; x++) value[x] = readShort(content); return value; }
protected short[][] readShortArray2D(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; short[][] value = new short[length][]; for (int x = 0; x < length; x++) value[x] = readShortArray(content); return value; }
protected BitSet readBitSet(byte[] content) throws IOException { int length = readInt(content); if (length == BinaryOutputCapsule.NULL_OBJECT) return null; BitSet value = new BitSet(length); for (int x = 0; x < length; x++) value.set(x, readBoolean(content)); return value; }
protected ID readSavable(byte[] content) throws IOException { int id = readInt(content); if (id == BinaryOutputCapsule.NULL_OBJECT) { return null; } return new ID(id); }
protected StringIDMap readStringSavableMap(byte[] content) throws IOException { int elements = readInt(content); if (elements == BinaryOutputCapsule.NULL_OBJECT) return null; String[] keys = readStringArray(content); ID[] values = readSavableArray(content); StringIDMap rVal = new StringIDMap(); rVal.keys = keys; rVal.values = values; return rVal; }