All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lordofthejars.nosqlunit.redis.embedded.ByteArrayIncrement Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.lordofthejars.nosqlunit.redis.embedded;

import java.io.UnsupportedEncodingException;

import redis.clients.util.SafeEncoder;

public class ByteArrayIncrement {

	private ByteArrayIncrement() {
		super();
	}
	
	public static long incrementValue(final long value, byte[] elementToUpdate) throws UnsupportedEncodingException, NumberFormatException {
		String elementString = SafeEncoder.encode(elementToUpdate);
		long longValue = Long.parseLong(elementString);
		longValue += value;
		return longValue;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy