Package org.htmlunit
Class DownloadedContent.InMemory
- java.lang.Object
-
- org.htmlunit.DownloadedContent.InMemory
-
- All Implemented Interfaces:
java.io.Serializable
,DownloadedContent
- Enclosing interface:
- DownloadedContent
public static class DownloadedContent.InMemory extends java.lang.Object implements DownloadedContent
Implementation keeping content in memory.- 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.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()
Description copied from interface:DownloadedContent
Returns a newInputStream
allowing to read the downloaded content.- Specified by:
getInputStream
in interfaceDownloadedContent
- Returns:
- the InputStream
-
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
-
length
public long length()
Description copied from interface:DownloadedContent
Returns the number of bytes.- Specified by:
length
in interfaceDownloadedContent
- Returns:
- the length
-
-