Package net.adoptopenjdk.icedteaweb.http
Class HttpUtils
- java.lang.Object
-
- net.adoptopenjdk.icedteaweb.http.HttpUtils
-
public class HttpUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateHttpUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconsumeAndCloseConnection(CloseableConnection c)Ensure a CloseableHttpConnection is fully read, required for correct behavior.static voidconsumeAndCloseConnectionSilently(CloseableConnection c)Ensure a CloseableHttpConnection is fully read, required for correct behavior.static java.lang.StringlastModifiedDate(java.time.ZonedDateTime time)
-
-
-
Field Detail
-
LOG
private static final Logger LOG
-
-
Method Detail
-
consumeAndCloseConnectionSilently
public static void consumeAndCloseConnectionSilently(CloseableConnection c)
Ensure a CloseableHttpConnection is fully read, required for correct behavior. Any thrown IOException is consumed and logged- Parameters:
c- the connection to be closed silently
-
consumeAndCloseConnection
public static void consumeAndCloseConnection(CloseableConnection c) throws java.io.IOException
Ensure a CloseableHttpConnection is fully read, required for correct behavior.- Parameters:
c- connection to be closed- Throws:
java.io.IOException- if an I/O exception occurs.
-
lastModifiedDate
public static java.lang.String lastModifiedDate(java.time.ZonedDateTime time)
-
-