Package org.htmlunit

Interface DownloadedContent

All Superinterfaces:
Serializable
All Known Implementing Classes:
DownloadedContent.InMemory, DownloadedContent.OnFile

public interface DownloadedContent extends Serializable
Wrapper for content downloaded from a remote server.
  • Nested Class Summary Link icon

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Implementation keeping content in memory.
    static class 
    Implementation keeping content on the file system.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    Clean up resources associated to this content.
    Returns a new InputStream allowing to read the downloaded content.
    boolean
    Returns true if the content is empty.
    long
    Returns the number of bytes.
  • Method Details Link icon

    • getInputStream Link icon

      InputStream getInputStream() throws IOException
      Returns a new InputStream allowing to read the downloaded content.
      Returns:
      the InputStream
      Throws:
      IOException - in case of problem accessing the content
    • cleanUp Link icon

      void cleanUp()
      Clean up resources associated to this content.
    • isEmpty Link icon

      boolean isEmpty()
      Returns true if the content is empty.
      Returns:
      true or false
    • length Link icon

      long length()
      Returns the number of bytes.
      Returns:
      the length