private void writeAttributes(final DataOutputStream out) throws IOException {
		out.writeShort(attrs.length);

		for (int i = 0; i < attrs.length; i++) {
			out.writeShort(attrs[i].nameIndex());
			out.writeInt(attrs[i].length());
			attrs[i].writeData(out);
		}
	}