用 json 检查更新

This commit is contained in:
seven332 committed 2014-04-05 22:28:45 +08:00
1 parent ea58ffed74
commit e45db97a54
3 files changed
+44

No files matched your search

@@ -0,0 +1,25 @@
package com.hippo.ehviewer.exception;
public class FileException extends Exception {
public static final int MKDIR_ERROR = 0x0;
public static final int CREATE_FILE_ERROR = 0x1;
public static final int NOT_DIR = 0x2;
public static final int NOT_FILE = 0x3;
public static final int CANNOT_EXECUTE = 0x4;
public static final int CANNOT_READ = 0x5;
public static final int CANNOT_WRITE = 0x6;
private int mErrorCode;
private static final long serialVersionUID = 1L;
public FileException(int errorCode) {
mErrorCode = errorCode;
}
public int getErrorCode() {
return mErrorCode;
}
}
@@ -0,0 +1,5 @@
package com.hippo.ehviewer.exception;
public class NoSdCardException extends Exception {
private static final long serialVersionUID = 1L;
}
@@ -0,0 +1,14 @@
package com.hippo.ehviewer.network;
public class Constant {
public static final int HTTP_TEMP_REDIRECT = 307;
public static String defaultUserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.76 Safari/537.36";
public static String userAgent = System.getProperty("http.agent", defaultUserAgent);
public static final int DEFAULT_TIMEOUT = 5 * 1000;
public static final int MAX_REDIRECTS = 5;
public static final int BUFFER_SIZE = 4096;
}