Class EpssResponseHandler
public class EpssResponseHandler
extends org.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler<List<EpssItem>>
HTTP response handler for parsing EPSS CSV data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandleEntity(org.apache.hc.core5.http.HttpEntity entity) Handles the HTTP entity by parsing the GZIP-compressed CSV data.handleResponse(org.apache.hc.core5.http.ClassicHttpResponse response) Handles the HTTP response and extracts EPSS items.
-
Constructor Details
-
EpssResponseHandler
public EpssResponseHandler()Constructs a new EpssResponseHandler.
-
-
Method Details
-
handleResponse
public List<EpssItem> handleResponse(org.apache.hc.core5.http.ClassicHttpResponse response) throws IOException Handles the HTTP response and extracts EPSS items.- Specified by:
handleResponsein interfaceorg.apache.hc.core5.http.io.HttpClientResponseHandler<List<EpssItem>>- Overrides:
handleResponsein classorg.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler<List<EpssItem>>- Parameters:
response- the HTTP response- Returns:
- a list of EPSS items
- Throws:
IOException- if an I/O error occurs
-
handleEntity
Handles the HTTP entity by parsing the GZIP-compressed CSV data.- Specified by:
handleEntityin classorg.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler<List<EpssItem>>- Parameters:
entity- the HTTP entity- Returns:
- a list of EPSS items
- Throws:
IOException- if an I/O error occurs or the data cannot be parsed
-