protected void writeAMF3Date(Date date) throws IOException {
    	if (debugMore) debug("writeAMF3Date(date=", date, ")");

    	write(AMF3_DATE);

        int index = indexOfStoredObjects(date);
        if (index >= 0)
            writeAMF3IntegerData(index << 1);
        else {
            addToStoredObjects(date);
            writeAMF3IntegerData(0x01);
            writeDouble(date.getTime());
        }
    }