org.apache.hc.client5.http.cache

## Interface HttpCacheEntrySerializer<T>

- All Known Implementing Classes:
    ByteArrayCacheEntrySerializer, HttpByteArrayCacheEntrySerializer, NoopCacheEntrySerializer

      @Contract(threading=STATELESS)
      public interface HttpCacheEntrySerializer<T>

  Serializer / deserializer for `HttpCacheStorageEntry` entries.
  Since:
    5.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpCacheStorageEntry` | `deserialize(T serializedObject)` Deserializes a cache entry from its serialized representation.
    `T` | `serialize(HttpCacheStorageEntry entry)` Serializes the given entry.

- - ### Method Detail

    - #### serialize

          T serialize(HttpCacheStorageEntry entry)
                      throws ResourceIOException

      Serializes the given entry.
      Parameters:
        `entry` - cache entry
      Returns:
        serialized representation of the cache entry
      Throws:
        `ResourceIOException`

    - #### deserialize

          HttpCacheStorageEntry deserialize(T serializedObject)
                                            throws ResourceIOException

      Deserializes a cache entry from its serialized representation.
      Parameters:
        `serializedObject` - serialized representation of the cache entry
      Returns:
        cache entry
      Throws:
        `ResourceIOException`

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.