@Experimental public class HttpByteArrayCacheEntrySerializer extends Object implements HttpCacheEntrySerializer<byte[]>
| Modifier and Type | Field and Description |
|---|---|
static HttpByteArrayCacheEntrySerializer |
INSTANCE |
| Constructor and Description |
|---|
HttpByteArrayCacheEntrySerializer() |
| Modifier and Type | Method and Description |
|---|---|
HttpCacheStorageEntry |
deserialize(byte[] serializedObject)
Deserializes a cache entry from its serialized representation.
|
protected InputStream |
makeByteArrayInputStream(byte[] bytes)
Helper method to make a new ByteArrayInputStream.
|
protected AbstractMessageParser<ClassicHttpResponse> |
makeHttpResponseParser()
Helper method to make a new HTTP Response parser.
|
protected AbstractMessageWriter<SimpleHttpResponse> |
makeHttpResponseWriter(SessionOutputBuffer outputBuffer)
Helper method to make a new HTTP response writer.
|
byte[] |
serialize(HttpCacheStorageEntry httpCacheEntry)
Serializes the given entry.
|
public static final HttpByteArrayCacheEntrySerializer INSTANCE
public byte[] serialize(HttpCacheStorageEntry httpCacheEntry) throws ResourceIOException
HttpCacheEntrySerializerserialize in interface HttpCacheEntrySerializer<byte[]>httpCacheEntry - cache entryResourceIOExceptionpublic HttpCacheStorageEntry deserialize(byte[] serializedObject) throws ResourceIOException
HttpCacheEntrySerializerdeserialize in interface HttpCacheEntrySerializer<byte[]>serializedObject - serialized representation of the cache entryResourceIOExceptionprotected AbstractMessageWriter<SimpleHttpResponse> makeHttpResponseWriter(SessionOutputBuffer outputBuffer)
Useful to override for testing.
outputBuffer - Output buffer to write toprotected InputStream makeByteArrayInputStream(byte[] bytes)
Useful to override for testing.
bytes - Bytes to read from the streamprotected AbstractMessageParser<ClassicHttpResponse> makeHttpResponseParser()
Useful to override for testing.
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.