protected byte[] readAMF3ByteArray() throws IOException {
        byte[] result = null;
        
        int type = readAMF3Integer();
        if ((type & 0x01) == 0) // stored object.
            result = (byte[])getFromStoredObjects(type >> 1);
        else {
            result = readBytes(type >> 1);
        	addToStoredObjects(result);
        }

        if (debugMore) debug("readAMF3ByteArray() -> ", result);
        
        return result;
    }