Package org.sonar.api.utils
Class HttpDownloader
- java.lang.Object
-
- org.sonar.api.utils.UriReader.SchemeProcessor
-
- org.sonar.api.utils.HttpDownloader
-
@ScannerSide @ServerSide public abstract class HttpDownloader extends UriReader.SchemeProcessor
This component is available in IoC container, so it should be injected through a constructor parameter. It is available in both scanner and server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpDownloader.HttpException
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CONNECT_TIMEOUT_IN_MILLISECONDSstatic intDEFAULT_READ_TIMEOUT_IN_MILLISECONDSstatic intTIMEOUT_MILLISECONDSDeprecated.since 7.0
-
Constructor Summary
Constructors Constructor Description HttpDownloader()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract byte[]download(java.net.URI uri)abstract voiddownload(java.net.URI uri, java.io.File toFile)abstract java.lang.StringdownloadPlainText(java.net.URI uri, java.lang.String encoding)abstract java.io.InputStreamopenStream(java.net.URI uri)-
Methods inherited from class org.sonar.api.utils.UriReader.SchemeProcessor
description, getSupportedSchemes, readBytes, readString
-
-
-
-
Field Detail
-
TIMEOUT_MILLISECONDS
@Deprecated public static final int TIMEOUT_MILLISECONDS
Deprecated.since 7.0Catch-all default timeout, replaced byDEFAULT_READ_TIMEOUT_IN_MILLISECONDSDEFAULT_CONNECT_TIMEOUT_IN_MILLISECONDS- See Also:
- Constant Field Values
-
DEFAULT_READ_TIMEOUT_IN_MILLISECONDS
public static final int DEFAULT_READ_TIMEOUT_IN_MILLISECONDS
- Since:
- 7.0
- See Also:
- Constant Field Values
-
DEFAULT_CONNECT_TIMEOUT_IN_MILLISECONDS
public static final int DEFAULT_CONNECT_TIMEOUT_IN_MILLISECONDS
- Since:
- 7.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
downloadPlainText
public abstract java.lang.String downloadPlainText(java.net.URI uri, java.lang.String encoding)
-
download
public abstract byte[] download(java.net.URI uri)
-
openStream
public abstract java.io.InputStream openStream(java.net.URI uri)
-
download
public abstract void download(java.net.URI uri, java.io.File toFile)
-
-