com.gargoylesoftware.htmlunit
Class DownloadedContent.OnFile

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.DownloadedContent.OnFile
All Implemented Interfaces:
DownloadedContent, Serializable
Enclosing interface:
DownloadedContent

public static class DownloadedContent.OnFile
extends Object
implements DownloadedContent

Implementation keeping content on the file system.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.gargoylesoftware.htmlunit.DownloadedContent
DownloadedContent.InMemory, DownloadedContent.OnFile
 
Constructor Summary
DownloadedContent.OnFile(File file, boolean temporary)
           
 
Method Summary
 void cleanUp()
          Clean up resources associated to this content.
 InputStream getInputStream()
          Returns a new InputStream allowing to read the downloaded content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownloadedContent.OnFile

public DownloadedContent.OnFile(File file,
                                boolean temporary)
Parameters:
file - the file
temporary - if true, the file will be deleted when cleanUp() is called.
Method Detail

getInputStream

public InputStream getInputStream()
                           throws FileNotFoundException
Description copied from interface: DownloadedContent
Returns a new InputStream allowing to read the downloaded content.

Specified by:
getInputStream in interface DownloadedContent
Returns:
the InputStream
Throws:
FileNotFoundException

cleanUp

public void cleanUp()
Description copied from interface: DownloadedContent
Clean up resources associated to this content.

Specified by:
cleanUp in interface DownloadedContent


Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.