private static void checkReadResult(final int n) throws ResourceIOException {
        if (n == -1) {
            throw new ResourceIOException("Unexpected end of stream");
        }
    }
Deserializes a byte array representation of an HTTP cache storage entry into an instance of
{@link HttpCacheStorageEntry}.

@param serializedObject the byte array representation of the HTTP cache storage entry
@return the deserialized HTTP cache storage entry
@throws ResourceIOException if an error occurs during deserialization
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/HttpByteArrayCacheEntrySerializer.java