private void readConstantPool(final DataInputStream in) throws IOException {
		final int count = in.readUnsignedShort();

		constants = new ArrayList(count);

		// The first constant is reserved for internal use by the JVM.
		constants.add(0, null);

		// Read the constants.
		for (int i = 1; i < count; i++) {
			constants.add(i, readConstant(in));

			switch (((Constant) constants.get(i)).tag()) {
			case Constant.LONG:
			case Constant.DOUBLE:
				// Longs and doubles take up 2 constant pool entries.
				constants.add(++i, null);
				break;
			}
		}
	}