org.apache.http.impl.client.cache
Class DefaultCacheEntrySerializer
java.lang.Object
org.apache.http.impl.client.cache.DefaultCacheEntrySerializer
- All Implemented Interfaces:
- HttpCacheEntrySerializer<CacheEntry>
@Immutable
public class DefaultCacheEntrySerializer
- extends Object
- implements HttpCacheEntrySerializer<CacheEntry>
HttpCacheEntrySerializer
implementation that uses the default (native)
serialization.
- Since:
- 4.1
- See Also:
Serializable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCacheEntrySerializer
public DefaultCacheEntrySerializer()
writeTo
public void writeTo(CacheEntry cacheEntry,
OutputStream os)
throws IOException
- Write a
CacheEntry
to an OutputStream
.
- Specified by:
writeTo
in interface HttpCacheEntrySerializer<CacheEntry>
- Parameters:
cacheEntry
- the entry to writeos
- the output stream to write to
- Throws:
IOException
- if problems occur writing the entry
readFrom
public CacheEntry readFrom(InputStream is)
throws IOException
- Read a
CacheEntry
from an InputStream
- Specified by:
readFrom
in interface HttpCacheEntrySerializer<CacheEntry>
- Parameters:
is
- the input stream to read from
- Returns:
- the cache entry
- Throws:
IOException
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.