protected byte[][] toByteArrays(final byte[] keyspace, final byte[] uid, final byte[] serviceCode, final byte[] key,
                                  final long expireMillis, final byte[][] values) {
        final byte[][] allArgs = new byte[values.length * 2 + 4][];

        int index = 0;
        allArgs[index++] = keyspace;
        allArgs[index++] = uid;
        allArgs[index++] = serviceCode;
        allArgs[index++] = key;
        byte[] expireTime = RedisProtocol.toByteArray(expireMillis);

        for (int i = 0; i < values.length; i++) {
            allArgs[index++] = values[i];
            allArgs[index++] = expireTime;
        }

        return allArgs;
    }
protected byte[][] toByteArrays(final byte[] keyspace, final byte[] uid, final byte[] serviceCode, final byte[] key,
                                  final long expireMillis, final byte[][] values) {
        final byte[][] allArgs = new byte[values.length * 2 + 4][];

        int index = 0;
        allArgs[index++] = keyspace;
        allArgs[index++] = uid;
        allArgs[index++] = serviceCode;
        allArgs[index++] = key;
        byte[] expireTime = RedisProtocol.toByteArray(expireMillis);

        for (int i = 0; i < values.length; i++) {
            allArgs[index++] = values[i];
            allArgs[index++] = expireTime;
        }

        return allArgs;
    }
protected byte [ ] [ ] toByteArrays ( final byte [ ] keyspace , final byte [ ] uid , final byte [ ] serviceCode , final byte [ ] key , final long expireMillis , final byte [ ] [ ] values ) { final byte [ ] [ ] allArgs = new byte [ values . length * 2 + 4 ] [ ] ; int index = 0 ; allArgs [ index ++ ] = keyspace ; allArgs [ index ++ ] = uid ; allArgs [ index ++ ] = serviceCode ; allArgs [ index ++ ] = key ; byte [ ] expireTime = RedisProtocol . toByteArray ( expireMillis ) ; for ( int i = 0 ; i < values . length ; i ++ ) { allArgs [ index ++ ] = values [ i ] ; allArgs [ index ++ ] = expireTime ; } return allArgs ; }
To byte arrays.

@param keyspace     the keyspace
@param uid          the uid
@param serviceCode  the service code
@param key          the key
@param expireMillis the expire millis
@param values       the values
@return the byte[][]
To byte arrays .