Package org.cip4.jdflib.util
Class URLWriter
java.lang.Object
org.cip4.jdflib.util.URLWriter
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
UrlUtil.URLWriter
-
Constructor Summary
ConstructorsConstructorDescriptionURLWriter(InputStream is, String strUrl, String method, String contentType, HTTPDetails details) URLWriter(InputStream is, URL url, String method, String contentType, HTTPDetails details) URLWriter(String strUrl, IStreamWriter streamWriter, String method, String contentType, HTTPDetails details) URLWriter(URL url, IStreamWriter streamWriter, String method, String contentType, HTTPDetails details) -
Method Summary
Modifier and TypeMethodDescriptionprotected UrlPartprotected UrlPartgetProxies(URI uri) booleanvoidrun()useful for asynchronous sending to a urlvoidsetAddDirect(boolean addDirect) toString()write a Stream to an output URL File: and http: are currently supported Use HttpURLConnection.getInputStream() to retrieve the http response
-
Constructor Details
-
URLWriter
public URLWriter(URL url, IStreamWriter streamWriter, String method, String contentType, HTTPDetails details) - Parameters:
strUrl- the URL to write tostream- the input stream to read fromstreamWriter-method- HEAD, GET or POSTcontentType- the contenttype to set, if NULL defaults to TEXT/UNKNOWNdetails-
-
URLWriter
public URLWriter(String strUrl, IStreamWriter streamWriter, String method, String contentType, HTTPDetails details) - Parameters:
strUrl- the URL to write tostream- the input stream to read fromstreamWriter-method- HEAD, GET or POSTcontentType- the contenttype to set, if NULL defaults to TEXT/UNKNOWNdetails-
-
URLWriter
public URLWriter(InputStream is, String strUrl, String method, String contentType, HTTPDetails details) - Parameters:
strUrl- the URL to write tostream- the input stream to read fromstreamWriter-method- HEAD, GET or POSTcontentType- the contenttype to set, if NULL defaults to TEXT/UNKNOWNdetails-
-
URLWriter
- Parameters:
strUrl- the URL to write tostream- the input stream to read fromstreamWriter-method- HEAD, GET or POSTcontentType- the contenttype to set, if NULL defaults to TEXT/UNKNOWNdetails-
-
-
Method Details
-
toString
-
isAddDirect
public boolean isAddDirect() -
setAddDirect
public void setAddDirect(boolean addDirect) -
writeToURL
write a Stream to an output URL File: and http: are currently supported Use HttpURLConnection.getInputStream() to retrieve the http response- Returns:
UrlPartthe opened http connection, null in case of error
-
getProxies
-
callProxy
- Parameters:
proxy-bWantLog-- Returns:
-
callProxy
- Throws:
IOExceptionProtocolException
-
getLastException
-
run
public void run()useful for asynchronous sending to a url
-