Example usage for org.apache.http.impl.client.cache.memcached MemcachedCacheEntry toByteArray

List of usage examples for org.apache.http.impl.client.cache.memcached MemcachedCacheEntry toByteArray

Introduction

In this page you can find the example usage for org.apache.http.impl.client.cache.memcached MemcachedCacheEntry toByteArray.

Prototype

byte[] toByteArray();

Source Link

Document

Returns a serialized representation of the current cache entry.

Usage

From source file:org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage.java

private byte[] serializeEntry(final String url, final HttpCacheEntry hce) throws IOException {
    final MemcachedCacheEntry mce = memcachedCacheEntryFactory.getMemcachedCacheEntry(url, hce);
    try {// w w w  .  j  av  a  2  s.c om
        return mce.toByteArray();
    } catch (final MemcachedSerializationException mse) {
        final IOException ioe = new IOException();
        ioe.initCause(mse);
        throw ioe;
    }
}