Packages

o

grizzled.net

URLUtil

object URLUtil

URL-related utility methods.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. URLUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. def download(url: URL, pathOut: File)(implicit ctx: ExecutionContext): Future[File]

    Download the specified URL to a file.

    Download the specified URL to a file.

    url

    The URL

    pathOut

    File to receive the output. If the file exists, it is overwritten. If the file does not exist, it is created. If any of the directories in the path do not exist, they are created.

    ctx

    The concurrent execution content to use

    returns

    A Future of the path.

  7. def download(url: String, pathOut: File)(implicit ctx: ExecutionContext): Future[String]

    Download the specified URL to a file.

    Download the specified URL to a file.

    url

    The string containing the URI/URL

    pathOut

    File to receive the output. If the file exists, it is overwritten. If the file does not exist, it is created. If any of the directories in the path do not exist, they are created.

    ctx

    The concurrent execution content to use

    returns

    a Future of the path

  8. def download(url: URL, pathOut: String)(implicit ctx: ExecutionContext): Future[String]

    Download the specified URL to a file.

    Download the specified URL to a file.

    url

    The grizzled.net.URL

    pathOut

    Path of file to receive the output. If the file exists, it is overwritten. If the file does not exist, it is created. If any of the directories in the path do not exist, they are created.

    ctx

    The concurrent execution content to use

    returns

    a Future of the path

  9. def download(url: java.net.URL, pathOut: String)(implicit ctx: ExecutionContext): Future[String]

    Download the specified URL to a file.

    Download the specified URL to a file.

    url

    The java.net.URL

    pathOut

    Path of file to receive the output. If the file exists, it is overwritten. If the file does not exist, it is created. If any of the directories in the path do not exist, they are created.

    ctx

    The concurrent execution content to use

    returns

    a Future of the path

  10. def download(url: String, pathOut: String)(implicit ctx: ExecutionContext): Future[String]

    Download the specified URL to a file.

    Download the specified URL to a file.

    url

    The string containing the URI/URL

    pathOut

    Path of file to receive the output. If the file exists, it is overwritten. If the file does not exist, it is created. If any of the directories in the path do not exist, they are created.

    ctx

    The concurrent execution content to use

    returns

    a Future of the path

  11. def download(url: URL)(implicit ctx: ExecutionContext): Future[File]

    Download the specified URL to a file.

    Download the specified URL to a file. The name of the file is a generated temporary file name. If you want to control the file name, use one of the other versions of this function.

    url

    The grizzled.net.URL

    ctx

    The concurrent execution content to use

    returns

    a Future of the file to which the download was written

  12. def download(url: java.net.URL)(implicit ctx: ExecutionContext): Future[File]

    Download the specified URL to a file.

    Download the specified URL to a file. The name of the file is a generated temporary file name. If you want to control the file name, use one of the other versions of this function.

    url

    The java.net.URL

    ctx

    The concurrent execution content to use

    returns

    a Future of the file to which the download was written

  13. def download(url: String)(implicit ctx: ExecutionContext): Future[File]

    Download the specified URL to a file.

    Download the specified URL to a file. The name of the file is a generated temporary file name. If you want to control the file name, use one of the other versions of this function.

    url

    The string containing the URI/URL

    ctx

    The concurrent execution content to use

    returns

    a Future of the file to which the download was written

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  28. def withDownloadedFile[T](url: URL, timeout: Duration)(block: (File) ⇒ T)(implicit ctx: ExecutionContext): Try[T]

    Execute a block of code with a downloaded, temporary file.

    Execute a block of code with a downloaded, temporary file. The specified URL is downloaded to a file, the file is passed to the block, and when the block exits, the file is removed.

    Note: This function is synchronous, waiting for the underlying Future objects using a timeout specified by the caller. For asynchronous operations, use download().

    url

    the URL

    timeout

    the timeout, as a duration.

    block

    the block to execute

    ctx

    The concurrent execution content to use

    returns

    Failure(error) on error. Success(t), where t is what the block returns, on success.

  29. def withDownloadedFile[T](url: java.net.URL, timeout: Duration)(block: (File) ⇒ T)(implicit ctx: ExecutionContext): Try[T]

    Execute a block of code with a downloaded, temporary file.

    Execute a block of code with a downloaded, temporary file. The specified URL is downloaded to a file, the file is passed to the block, and when the block exits, the file is removed.

    Note: This function is synchronous, waiting for the underlying Future objects using a timeout specified by the caller. For asynchronous operations, use download().

    url

    the java.net.URL

    timeout

    the timeout, as a duration.

    block

    the block to execute

    ctx

    The concurrent execution content to use

    returns

    Failure(error) on error. Success(t), where t is what the block returns, on success.

  30. def withDownloadedFile[T](url: String, timeout: Duration)(block: (File) ⇒ T)(implicit ctx: ExecutionContext): Try[T]

    Execute a block of code with a downloaded, temporary file.

    Execute a block of code with a downloaded, temporary file. The specified URL is downloaded to a file, the file is passed to the block, and when the block exits, the file is removed.

    Note: This function is synchronous, waiting for the underlying Future objects using a timeout specified by the caller. For asynchronous operations, use download().

    url

    the URL

    timeout

    the timeout, as a duration.

    block

    the block to execute

    ctx

    The concurrent execution content to use

    returns

    Failure(error) on error. Success(t), where t is what the block returns, on success.

Inherited from AnyRef

Inherited from Any

Ungrouped