java.lang.Object
de.sormuras.bach.Resources
public class Resources
extends java.lang.Object
Uniform Resource Identifier (
URI) read and download support.-
Constructor Summary
-
Method Summary
Modifier and Type Method Description java.nio.file.Pathcopy(java.net.URI uri, java.nio.file.Path path, java.nio.file.CopyOption... options)Copy all content from a uri to a target file.java.net.http.HttpResponse<java.lang.Void>head(java.net.URI uri, int timeout)static ResourcesofSystem()java.lang.Stringread(java.net.URI uri)Read all content from a uri into a string.
-
Constructor Details
-
Method Details
-
ofSystem
-
head
public java.net.http.HttpResponse<java.lang.Void> head(java.net.URI uri, int timeout) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
copy
public java.nio.file.Path copy(java.net.URI uri, java.nio.file.Path path, java.nio.file.CopyOption... options) throws java.lang.ExceptionCopy all content from a uri to a target file.- Throws:
java.lang.Exception
-
read
public java.lang.String read(java.net.URI uri) throws java.io.IOException, java.lang.InterruptedExceptionRead all content from a uri into a string.- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-