Package org.htmlunit
Class DownloadedContent.OnFile
java.lang.Object
org.htmlunit.DownloadedContent.OnFile
- All Implemented Interfaces:
Serializable
,DownloadedContent
- Enclosing interface:
DownloadedContent
Implementation keeping content on the file system.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.htmlunit.DownloadedContent
DownloadedContent.InMemory, DownloadedContent.OnFile
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanUp()
Clean up resources associated to this content.protected void
finalize()
Returns a newInputStream
allowing to read the downloaded content.boolean
isEmpty()
Returns true if the content is empty.long
length()
Returns the number of bytes.
-
Method Details
-
getInputStream
Description copied from interface:DownloadedContent
Returns a newInputStream
allowing to read the downloaded content.- Specified by:
getInputStream
in interfaceDownloadedContent
- Returns:
- the InputStream
- Throws:
IOException
- in case of problem accessing the content
-
cleanUp
public void cleanUp()Description copied from interface:DownloadedContent
Clean up resources associated to this content.- Specified by:
cleanUp
in interfaceDownloadedContent
-
isEmpty
public boolean isEmpty()Description copied from interface:DownloadedContent
Returns true if the content is empty.- Specified by:
isEmpty
in interfaceDownloadedContent
- Returns:
- true or false
-
finalize
-
length
public long length()Description copied from interface:DownloadedContent
Returns the number of bytes.- Specified by:
length
in interfaceDownloadedContent
- Returns:
- the length
-