Package org.htmlunit
Interface DownloadedContent
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DownloadedContent.InMemory,DownloadedContent.OnFile
Wrapper for content downloaded from a remote server.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classImplementation keeping content in memory.static classImplementation keeping content on the file system. -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()Clean up resources associated to this content.Returns a newInputStreamallowing to read the downloaded content.booleanisEmpty()Returns true if the content is empty.longlength()Returns the number of bytes.
-
Method Details
-
getInputStream
Returns a newInputStreamallowing to read the downloaded content.- Returns:
- the InputStream
- Throws:
IOException- in case of problem accessing the content
-
cleanUp
void cleanUp()Clean up resources associated to this content. -
isEmpty
boolean isEmpty()Returns true if the content is empty.- Returns:
- true or false
-
length
long length()Returns the number of bytes.- Returns:
- the length
-