Package org.sonar.api.utils
Class UriReader
- java.lang.Object
- 
- org.sonar.api.utils.UriReader
 
- 
 @ScannerSide @ServerSide @ComputeEngineSide public class UriReader extends java.lang.Object Reads different types of URI. Supported schemes are http and file.- Since:
- 3.2
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classUriReader.SchemeProcessor
 - 
Constructor SummaryConstructors Constructor Description UriReader(UriReader.SchemeProcessor[] processors)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdescription(java.net.URI uri)Returns a detailed description of the given uri.byte[]readBytes(java.net.URI uri)Reads all bytes from uri.java.lang.StringreadString(java.net.URI uri, java.nio.charset.Charset charset)Reads all characters from uri, using the given character set.
 
- 
- 
- 
Constructor Detail- 
UriReaderpublic UriReader(UriReader.SchemeProcessor[] processors) 
 
- 
 - 
Method Detail- 
readBytespublic byte[] readBytes(java.net.URI uri) Reads all bytes from uri. It throws an unchecked exception if an error occurs.
 - 
readStringpublic java.lang.String readString(java.net.URI uri, java.nio.charset.Charset charset)Reads all characters from uri, using the given character set. It throws an unchecked exception if an error occurs.
 - 
descriptionpublic java.lang.String description(java.net.URI uri) Returns a detailed description of the given uri. For example HTTP URIs are completed with the configured HTTP proxy.
 
- 
 
-