org.sonar.api.utils
Class HttpDownloader

java.lang.Object
  extended by org.sonar.api.utils.HttpDownloader
All Implemented Interfaces:
BatchComponent, ServerComponent

public class HttpDownloader
extends Object
implements BatchComponent, ServerComponent

This component downloads HTTP files

Since:
2.2

Field Summary
static int TIMEOUT_MILLISECONDS
           
 
Constructor Summary
HttpDownloader(Server server, Settings settings)
           
HttpDownloader(Settings settings)
           
 
Method Summary
 byte[] download(URI uri)
           
 void download(URI uri, File toFile)
           
 String downloadPlainText(URI uri, String encoding)
           
 String getProxySynthesis(URI uri)
           
 InputStream openStream(URI uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMEOUT_MILLISECONDS

public static final int TIMEOUT_MILLISECONDS
See Also:
Constant Field Values
Constructor Detail

HttpDownloader

public HttpDownloader(Server server,
                      Settings settings)

HttpDownloader

public HttpDownloader(Settings settings)
Method Detail

getProxySynthesis

public String getProxySynthesis(URI uri)

download

public void download(URI uri,
                     File toFile)

download

public byte[] download(URI uri)

downloadPlainText

public String downloadPlainText(URI uri,
                                String encoding)

openStream

public InputStream openStream(URI uri)


Copyright © 2009-2012 SonarSource. All Rights Reserved.