Subversion Repositories SmartDukaan

Rev

Rev 4641 | Rev 6050 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4641 Rev 4643
Line 42... Line 42...
42
	private static String errorURL;
42
	private static String errorURL;
43
	private static final String regex = "[^a-zA-Z0-9\\s\\-\\@\\/\\.]";
43
	private static final String regex = "[^a-zA-Z0-9\\s\\-\\@\\/\\.]";
44
	private static final String replacement = " ";
44
	private static final String replacement = " ";
45
	private static final int MAX_UDF_LENGTH = 30;
45
	private static final int MAX_UDF_LENGTH = 30;
46
	private static final String currencyCode = "356";
46
	private static final String currencyCode = "356";
47
	private static String resourceDirPath = "/tmp/resource";
47
	private static String resourceDirPath = "/tmp/resource/";
48
	private static final String resourceFileName = "resource.cgn";
48
	private static final String resourceFileName = "resource.cgn";
49
	
49
	
50
	private enum ActionType{
50
	private enum ActionType{
51
		PURCHASE("1"),
51
		PURCHASE("1"),
52
		AUTH ("4"),
52
		AUTH ("4"),
Line 70... Line 70...
70
			File resourceDir = new File(resourceDirPath);
70
			File resourceDir = new File(resourceDirPath);
71
			if(!resourceDir.exists()){
71
			if(!resourceDir.exists()){
72
				resourceDir.mkdir();
72
				resourceDir.mkdir();
73
			}
73
			}
74
			
74
			
75
			OutputStream outStream = new FileOutputStream(resourceDirPath + File.separator + resourceFileName);
75
			OutputStream outStream = new FileOutputStream(resourceDirPath + resourceFileName);
76
			byte buf[]=new byte[1024];
76
			byte buf[]=new byte[1024];
77
			int len;
77
			int len;
78
			while((len=inputStream.read(buf))>0)
78
			while((len=inputStream.read(buf))>0)
79
				outStream.write(buf,0,len);
79
				outStream.write(buf,0,len);
80
			outStream.close();
80
			outStream.close();