public class OwHttpContentDisposition extends Object
A simple class to generate the HTTP attachment element to be used with Content-Disposition header. This class tries to handle UTF-8 file names in the best possible way for all user agents. Everything is supposed to be UTF-8 encoded.
For a discussion of the specs see
For a discussion on how different user agents handle non ASCI characters in HTML headers see http://blogs.warwick.ac.uk/kieranshaw/entry/utf-8_internationalisation_with.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Modifier and Type | Class and Description |
---|---|
static class |
OwHttpContentDisposition.OwElementType
OwElementType.
|
Modifier and Type | Method and Description |
---|---|
static OwHttpContentDisposition |
forRequest(javax.servlet.http.HttpServletRequest request_p,
String fileName_p,
OwHttpContentDisposition.OwElementType elementType_p)
Tries to build the right attachment element for the requesting agent.
|
String |
toString() |
public static OwHttpContentDisposition forRequest(javax.servlet.http.HttpServletRequest request_p, String fileName_p, OwHttpContentDisposition.OwElementType elementType_p) throws UnsupportedEncodingException
request_p
- The initial request from the client. We need it in order to detect the user agent.fileName_p
- The name of the file to be used in the attachment element.elementType_p
- inline or attachmentOwHttpContentDisposition
UnsupportedEncodingException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.