public class AS2HttpURLConnection extends Object implements IAS2HttpConnection
| Constructor and Description |
|---|
AS2HttpURLConnection(HttpURLConnection aConnection) |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect()
Close the connection
|
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
int |
getResponseCode() |
com.helger.commons.http.HttpHeaderMap |
getResponseHeaderFields() |
String |
getResponseMessage() |
URL |
getURL() |
void |
setHttpHeader(String sName,
String sValue)
Set an HTTP header
|
public AS2HttpURLConnection(@Nonnull HttpURLConnection aConnection)
public void setHttpHeader(@Nonnull String sName, @Nonnull String sValue)
IAS2HttpConnectionsetHttpHeader in interface IAS2HttpConnectionsName - Header namesValue - Header valuepublic URL getURL()
getURL in interface IAS2HttpConnectionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface IAS2HttpConnectionIOException - in case of errorpublic InputStream getInputStream() throws IOException
getInputStream in interface IAS2HttpConnectionIOException - in case of errorpublic int getResponseCode()
throws IOException
getResponseCode in interface IAS2HttpConnectionIOException - in case of errorpublic String getResponseMessage() throws IOException
getResponseMessage in interface IAS2HttpConnectionIOException - in case of error@Nonnull public com.helger.commons.http.HttpHeaderMap getResponseHeaderFields()
getResponseHeaderFields in interface IAS2HttpConnectionpublic void disconnect()
IAS2HttpConnectiondisconnect in interface IAS2HttpConnectionCopyright © 2013–2019 Philip Helger. All rights reserved.