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
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. 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.

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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 taken from the URL, if possible, or generated otherwise.

    url

    The grizzled.net.URL

    ctx

    The concurrent execution content to use

    returns

    a Future of the file to which the download was written

  14. 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 taken from the URL, if possible, or generated otherwise.

    url

    The java.net.URL

    ctx

    The concurrent execution content to use

    returns

    a Future of the file to which the download was written

  15. 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 taken from the URL, if possible, or generated otherwise.

    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

  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. 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.

  31. 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.

  32. 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