Class ByteArrayCacheEntrySerializer
- java.lang.Object
-
- org.apache.hc.client5.http.impl.cache.ByteArrayCacheEntrySerializer
-
- All Implemented Interfaces:
HttpCacheEntrySerializer<byte[]>
@Contract(threading=STATELESS) public final class ByteArrayCacheEntrySerializer extends java.lang.Object implements HttpCacheEntrySerializer<byte[]>
HttpCacheEntrySerializerimplementation that uses the default (native) serialization.- Since:
- 4.1
- See Also:
Serializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classByteArrayCacheEntrySerializer.RestrictedObjectInputStream
-
Field Summary
Fields Modifier and Type Field Description static ByteArrayCacheEntrySerializerINSTANCE
-
Constructor Summary
Constructors Constructor Description ByteArrayCacheEntrySerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpCacheStorageEntrydeserialize(byte[] serializedObject)Deserializes a cache entry from its serialized representation.byte[]serialize(HttpCacheStorageEntry cacheEntry)Serializes the given entry.
-
-
-
Field Detail
-
INSTANCE
public static final ByteArrayCacheEntrySerializer INSTANCE
-
-
Method Detail
-
serialize
public byte[] serialize(HttpCacheStorageEntry cacheEntry) throws ResourceIOException
Description copied from interface:HttpCacheEntrySerializerSerializes the given entry.- Specified by:
serializein interfaceHttpCacheEntrySerializer<byte[]>- Parameters:
cacheEntry- cache entry- Returns:
- serialized representation of the cache entry
- Throws:
ResourceIOException
-
deserialize
public HttpCacheStorageEntry deserialize(byte[] serializedObject) throws ResourceIOException
Description copied from interface:HttpCacheEntrySerializerDeserializes a cache entry from its serialized representation.- Specified by:
deserializein interfaceHttpCacheEntrySerializer<byte[]>- Parameters:
serializedObject- serialized representation of the cache entry- Returns:
- cache entry
- Throws:
ResourceIOException
-
-