import sixapi.*;

import java.util.Arrays;

public class CookieHandler {
	private Integer cookie = 0;
	
	public String getNextCookie()
	{
		cookie++;
		return cookie.toString();
	}
	
	public Integer currentCookieInteger()
	{
		return cookie;
	}
	
	public String currentCookieString()
	{
		return cookie.toString();
	}
	
	public String getCookie(SixDataRes response)
	{
		String[] fetchCookie=response.getPropertyValue(SixCmd.COOKIE_PROP);

		if (fetchCookie == null)
			return null;
		
		return Arrays.toString(fetchCookie);
	}
	
	public String addBrackets(String cookieNumber)
	{
		return "["+cookieNumber+"]";
	}
}