cynosurex.net
Class UniformResourceLocator
java.lang.Object
cynosurex.net.UniformResourceLocator
- All Implemented Interfaces:
- cynosurex.internal.AuthorCommon, cynosurex.internal.CommonInterface, cynosurex.internal.CompanyCommon
public class UniformResourceLocator
- extends java.lang.Object
- implements cynosurex.internal.CommonInterface
This class provides functionality related to Internet URL.
Fields inherited from interface cynosurex.internal.CommonInterface |
copyright, copyrightYears, notice, program, version |
Fields inherited from interface cynosurex.internal.AuthorCommon |
author, copyrightSymbol, noticeMsg, rights |
Fields inherited from interface cynosurex.internal.CompanyCommon |
company, email, website |
Method Summary |
java.lang.String |
download()
This method downloads the URL content and returns it as a String. |
void |
downloadTo(java.io.FileOutputStream fos)
This method downloads the URL content to a FileOutputStream. |
void |
downloadToFile(java.lang.String filePath)
This method downloads the URL content to a file specified
in the argument. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UniformResourceLocator
public UniformResourceLocator(java.lang.String spec)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
download
public java.lang.String download()
throws java.io.IOException
- This method downloads the URL content and returns it as a String.
- Throws:
java.io.IOException
downloadTo
public void downloadTo(java.io.FileOutputStream fos)
throws java.io.IOException
- This method downloads the URL content to a FileOutputStream.
- Throws:
java.io.IOException
downloadToFile
public void downloadToFile(java.lang.String filePath)
throws java.io.IOException
- This method downloads the URL content to a file specified
in the argument.
- Throws:
java.io.IOException