org.apache.http.impl.client.cache
Class DefaultCacheEntrySerializer

java.lang.Object
  extended by 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

Constructor Summary
DefaultCacheEntrySerializer()
           
 
Method Summary
 CacheEntry readFrom(InputStream is)
          Read a CacheEntry from an InputStream
 void writeTo(CacheEntry cacheEntry, OutputStream os)
          Write a CacheEntry to an OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCacheEntrySerializer

public DefaultCacheEntrySerializer()
Method Detail

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 write
os - 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.