diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-07-18 21:26:42 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-07-18 21:26:42 +0200 |
| commit | a3e7256c505f9df3335aca417f36e4a8e96a5b4a (patch) | |
| tree | 6331afee572dedf22a2609bce28bca72818340ad /main/src/cgeo/geocaching/files/LocalStorage.java | |
| parent | 770f8a0894da84fd74d2e01da5abf8785eeacd75 (diff) | |
| download | cgeo-a3e7256c505f9df3335aca417f36e4a8e96a5b4a.zip cgeo-a3e7256c505f9df3335aca417f36e4a8e96a5b4a.tar.gz cgeo-a3e7256c505f9df3335aca417f36e4a8e96a5b4a.tar.bz2 | |
refactoring: extract constant
Diffstat (limited to 'main/src/cgeo/geocaching/files/LocalStorage.java')
| -rw-r--r-- | main/src/cgeo/geocaching/files/LocalStorage.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/files/LocalStorage.java b/main/src/cgeo/geocaching/files/LocalStorage.java index 0f3e0e1..ec09433 100644 --- a/main/src/cgeo/geocaching/files/LocalStorage.java +++ b/main/src/cgeo/geocaching/files/LocalStorage.java @@ -31,6 +31,9 @@ import java.io.OutputStream; */ public class LocalStorage { + public static final String HEADER_LAST_MODIFIED = "last-modified"; + public static final String HEADER_ETAG = "etag"; + /** Name of the local private directory used to hold cached information */ public final static String cache = ".cgeo"; @@ -177,8 +180,8 @@ public class LocalStorage { try { final boolean saved = saveToFile(response.getEntity().getContent(), targetFile); - saveHeader("etag", saved ? response : null, targetFile); - saveHeader("last-modified", saved ? response : null, targetFile); + saveHeader(HEADER_ETAG, saved ? response : null, targetFile); + saveHeader(HEADER_LAST_MODIFIED, saved ? response : null, targetFile); return saved; } catch (IOException e) { Log.e("LocalStorage.saveEntityToFile", e); |
