protected void writeAMF3Integer(int i) throws IOException {
    	if (debugMore) debug("writeAMF3Integer(i=", String.valueOf(i), ")");

    	if (i < AMF3_INTEGER_MIN || i > AMF3_INTEGER_MAX) {
    		if (debugMore) debug(
    			"writeAMF3Integer() - ", Integer.valueOf(i),
    			" is out of AMF3 int range, writing it as a Number"
    		);
            writeAMF3Number(i);
    	} else {
            write(AMF3_INTEGER);
            writeAMF3IntegerData(i);
        }
    }