Package org.htmlunit
Class DownloadedContent.OnFile
- java.lang.Object
-
- org.htmlunit.DownloadedContent.OnFile
-
- All Implemented Interfaces:
java.io.Serializable
,DownloadedContent
- Enclosing interface:
- DownloadedContent
public static class DownloadedContent.OnFile extends java.lang.Object implements DownloadedContent
Implementation keeping content on the file system.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.htmlunit.DownloadedContent
DownloadedContent.InMemory, DownloadedContent.OnFile
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Clean up resources associated to this content.protected void
finalize()
java.io.InputStream
getInputStream()
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 Detail
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
Description copied from interface:DownloadedContent
Returns a newInputStream
allowing to read the downloaded content.- Specified by:
getInputStream
in interfaceDownloadedContent
- Returns:
- the InputStream
- Throws:
java.io.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
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
length
public long length()
Description copied from interface:DownloadedContent
Returns the number of bytes.- Specified by:
length
in interfaceDownloadedContent
- Returns:
- the length
-
-