Class Uris
- java.lang.Object
-
- org.apache.logging.log4j.layout.template.json.util.Uris
-
public final class Uris extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateUris()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringconsumeReader(java.io.BufferedReader reader)private static java.lang.StringreadClassPathUri(java.net.URI uri, java.nio.charset.Charset charset)private static java.lang.StringreadFileUri(java.net.URI uri, java.nio.charset.Charset charset)static java.lang.StringreadUri(java.lang.String spec, java.nio.charset.Charset charset)ReadsURIspecs of scheme classpath and file.static java.lang.StringreadUri(java.net.URI uri, java.nio.charset.Charset charset)ReadsURIs of scheme classpath and file.private static java.lang.StringunsafeReadUri(java.net.URI uri, java.nio.charset.Charset charset)
-
-
-
Field Detail
-
LOGGER
private static final Logger LOGGER
-
-
Method Detail
-
readUri
public static java.lang.String readUri(java.lang.String spec, java.nio.charset.Charset charset)ReadsURIspecs of scheme classpath and file.- Parameters:
spec- theURIspec, e.g., file:/holy/cow.txt or classpath:/holy/cat.txtcharset- usedCharsetfor decoding the file
-
readUri
public static java.lang.String readUri(java.net.URI uri, java.nio.charset.Charset charset)ReadsURIs of scheme classpath and file.- Parameters:
uri- theURI, e.g., file:/holy/cow.txt or classpath:/holy/cat.txtcharset- usedCharsetfor decoding the file
-
unsafeReadUri
private static java.lang.String unsafeReadUri(java.net.URI uri, java.nio.charset.Charset charset) throws java.lang.Exception- Throws:
java.lang.Exception
-
readFileUri
private static java.lang.String readFileUri(java.net.URI uri, java.nio.charset.Charset charset) throws java.io.IOException- Throws:
java.io.IOException
-
readClassPathUri
private static java.lang.String readClassPathUri(java.net.URI uri, java.nio.charset.Charset charset) throws java.io.IOException- Throws:
java.io.IOException
-
consumeReader
private static java.lang.String consumeReader(java.io.BufferedReader reader) throws java.io.IOException- Throws:
java.io.IOException
-
-