## com.gargoylesoftware.htmlunit.attachment
Class Attachment

    java.lang.Object
      com.gargoylesoftware.htmlunit.attachment.Attachment

    public class Attachment

extends java.lang.Object

An attachment represents a page received from the server which contains a `Content-Disposition=attachment` header.

Version:
  $Revision: 4002 $
Author:
  Bruce Chapman, Sudhan Moghe, Daniel Gredler

Constructor Summary
`Attachment(Page page)` Creates a new attachment for the specified page.

Method Summary
`Page` `getPage()` Returns the attached page.
`java.lang.String` `getSuggestedFilename()` Returns the attachment's filename, as suggested by the `Content-Disposition` header, or `null` if no filename was suggested.
`static boolean` `isAttachment(WebResponse response)` Returns `true` if the specified response represents an attachment.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Attachment

    public Attachment(Page page)

  Creates a new attachment for the specified page.

  Parameters:
    `page` - the attached page

Method Detail

### getPage

    public Page getPage()

  Returns the attached page.

  Returns:
    the attached page

### getSuggestedFilename

    public java.lang.String getSuggestedFilename()

  Returns the attachment's filename, as suggested by the `Content-Disposition` header, or `null` if no filename was suggested.

  Returns:
    the attachment's suggested filename, or `null` if none was suggested

### isAttachment

    public static boolean isAttachment(WebResponse response)

  Returns `true` if the specified response represents an attachment.

  Parameters:
    `response` - the response to check
  Returns:
    `true` if the specified response represents an attachment, `false` otherwise
  See Also:
    RFC 2183

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