org.apache.hc.client5.http.impl.cache

## Class ByteArrayCacheEntrySerializer

- java.lang.Object
- - org.apache.hc.client5.http.impl.cache.ByteArrayCacheEntrySerializer

- All Implemented Interfaces:
    HttpCacheEntrySerializer<byte[]>

  Deprecated.
  This class is deprecated and will be removed in a future release. Please use `HttpByteArrayCacheEntrySerializer` for improved performance.

      @Deprecated
       @Contract(threading=STATELESS)
      public final class ByteArrayCacheEntrySerializer
      extends Object
      implements HttpCacheEntrySerializer<byte[]>

  `HttpCacheEntrySerializer` implementation that uses the default (native) serialization.
  Since:
    4.1
  See Also:
    `Serializable`, `HttpByteArrayCacheEntrySerializer`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ByteArrayCacheEntrySerializer` | `INSTANCE` Deprecated. Default instance of `ByteArrayCacheEntrySerializer`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ByteArrayCacheEntrySerializer()` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpCacheStorageEntry` | `deserialize(byte[] serializedObject)` Deprecated. Deserializes a cache entry from its serialized representation.
    `byte[]` | `serialize(HttpCacheStorageEntry cacheEntry)` Deprecated. Serializes the given entry.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final ByteArrayCacheEntrySerializer INSTANCE

      Deprecated.
      Default instance of `ByteArrayCacheEntrySerializer`.

  - ### Constructor Detail

    - #### ByteArrayCacheEntrySerializer

          public ByteArrayCacheEntrySerializer()

      Deprecated.

  - ### Method Detail

    - #### serialize

          public byte[] serialize(HttpCacheStorageEntry cacheEntry)
                           throws ResourceIOException

      Deprecated.
      Description copied from interface: `HttpCacheEntrySerializer`
      Serializes the given entry.
      Specified by:
        `serialize` in interface `HttpCacheEntrySerializer<byte[]>`
      Parameters:
        `cacheEntry` - cache entry
      Returns:
        serialized representation of the cache entry
      Throws:
        `ResourceIOException`

    - #### deserialize

          public HttpCacheStorageEntry deserialize(byte[] serializedObject)
                                            throws ResourceIOException

      Deprecated.
      Description copied from interface: `HttpCacheEntrySerializer`
      Deserializes a cache entry from its serialized representation.
      Specified by:
        `deserialize` in interface `HttpCacheEntrySerializer<byte[]>`
      Parameters:
        `serializedObject` - serialized representation of the cache entry
      Returns:
        cache entry
      Throws:
        `ResourceIOException`

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