source: josm/trunk/src/org/openstreetmap/josm/data/cache/CacheEntry.java@ 14273

Last change on this file since 14273 was 10723, checked in by simon04, 8 years ago

Fix javadoc

  • Property svn:eol-style set to native
File size: 764 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.cache;
3
4import java.io.Serializable;
5import java.util.Arrays;
6
7/**
8 * Class that will hold JCS cache entries
9 *
10 * @author Wiktor Niesiobędzki
11 */
12public class CacheEntry implements Serializable {
13 private static final long serialVersionUID = 1L; //version
14 protected byte[] content;
15
16 /**
17 * @param content of the cache entry
18 */
19 public CacheEntry(byte[] content) {
20 this.content = Arrays.copyOf(content, content.length);
21 }
22
23 /**
24 * @return cache entry content
25 */
26 public byte[] getContent() {
27 if (content == null) {
28 return new byte[]{};
29 }
30 return Arrays.copyOf(content, content.length);
31 }
32}
Note: See TracBrowser for help on using the repository browser.