Last change
on this file since 13388 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.
|
---|
2 | package org.openstreetmap.josm.data.cache;
|
---|
3 |
|
---|
4 | import java.io.Serializable;
|
---|
5 | import java.util.Arrays;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Class that will hold JCS cache entries
|
---|
9 | *
|
---|
10 | * @author Wiktor Niesiobędzki
|
---|
11 | */
|
---|
12 | public 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.