org.apache.wss4j.common.util
Class AttachmentUtils

java.lang.Object
  extended by org.apache.wss4j.common.util.AttachmentUtils

public class AttachmentUtils
extends Object


Field Summary
static Set<String> ALL_PARAMS
           
static char ASTERISK
           
static char BACKSLASH
           
static char CARRIAGE_RETURN
           
static char DOUBLE_QUOTE
           
static char EQUAL
           
static char HTAB
           
static char LEFT_PARENTHESIS
           
static char LINEFEED
           
static String MIME_HEADER_CONTENT_DESCRIPTION
           
static String MIME_HEADER_CONTENT_DISPOSITION
           
static String MIME_HEADER_CONTENT_ID
           
static String MIME_HEADER_CONTENT_LOCATION
           
static String MIME_HEADER_CONTENT_TYPE
           
static String PARAM_CHARSET
           
static String PARAM_CREATION_DATE
           
static String PARAM_FILENAME
           
static String PARAM_MODIFICATION_DATE
           
static String PARAM_PADDING
           
static String PARAM_READ_DATE
           
static String PARAM_SIZE
           
static String PARAM_TYPE
           
static char RIGHT_PARENTHESIS
           
static char SEMICOLON
           
static char SINGLE_QUOTE
           
static char SPACE
           
 
Constructor Summary
AttachmentUtils()
           
 
Method Summary
static void canonizeMimeHeaders(OutputStream os, Map<String,String> headers)
           
static String concatParamValues(String a, String b)
           
static String decodeRfc2184(String text)
           
static String quote(String text)
           
static void readAndReplaceEncryptedAttachmentHeaders(Map<String,String> headers, InputStream attachmentInputStream)
           
static InputStream setupAttachmentDecryptionStream(String encAlgo, Cipher cipher, Key key, InputStream inputStream)
           
static InputStream setupAttachmentEncryptionStream(Cipher cipher, boolean complete, Attachment attachment, Map<String,String> headers)
           
static String uncomment(String text)
           
static String unfold(String text)
           
static String unfoldWhitespace(String text)
           
static String unquoteInnerText(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIME_HEADER_CONTENT_DESCRIPTION

public static final String MIME_HEADER_CONTENT_DESCRIPTION
See Also:
Constant Field Values

MIME_HEADER_CONTENT_DISPOSITION

public static final String MIME_HEADER_CONTENT_DISPOSITION
See Also:
Constant Field Values

MIME_HEADER_CONTENT_ID

public static final String MIME_HEADER_CONTENT_ID
See Also:
Constant Field Values

MIME_HEADER_CONTENT_LOCATION

public static final String MIME_HEADER_CONTENT_LOCATION
See Also:
Constant Field Values

MIME_HEADER_CONTENT_TYPE

public static final String MIME_HEADER_CONTENT_TYPE
See Also:
Constant Field Values

DOUBLE_QUOTE

public static final char DOUBLE_QUOTE
See Also:
Constant Field Values

SINGLE_QUOTE

public static final char SINGLE_QUOTE
See Also:
Constant Field Values

LEFT_PARENTHESIS

public static final char LEFT_PARENTHESIS
See Also:
Constant Field Values

RIGHT_PARENTHESIS

public static final char RIGHT_PARENTHESIS
See Also:
Constant Field Values

CARRIAGE_RETURN

public static final char CARRIAGE_RETURN
See Also:
Constant Field Values

LINEFEED

public static final char LINEFEED
See Also:
Constant Field Values

SPACE

public static final char SPACE
See Also:
Constant Field Values

HTAB

public static final char HTAB
See Also:
Constant Field Values

EQUAL

public static final char EQUAL
See Also:
Constant Field Values

ASTERISK

public static final char ASTERISK
See Also:
Constant Field Values

SEMICOLON

public static final char SEMICOLON
See Also:
Constant Field Values

BACKSLASH

public static final char BACKSLASH
See Also:
Constant Field Values

PARAM_CHARSET

public static final String PARAM_CHARSET
See Also:
Constant Field Values

PARAM_CREATION_DATE

public static final String PARAM_CREATION_DATE
See Also:
Constant Field Values

PARAM_FILENAME

public static final String PARAM_FILENAME
See Also:
Constant Field Values

PARAM_MODIFICATION_DATE

public static final String PARAM_MODIFICATION_DATE
See Also:
Constant Field Values

PARAM_PADDING

public static final String PARAM_PADDING
See Also:
Constant Field Values

PARAM_READ_DATE

public static final String PARAM_READ_DATE
See Also:
Constant Field Values

PARAM_SIZE

public static final String PARAM_SIZE
See Also:
Constant Field Values

PARAM_TYPE

public static final String PARAM_TYPE
See Also:
Constant Field Values

ALL_PARAMS

public static final Set<String> ALL_PARAMS
Constructor Detail

AttachmentUtils

public AttachmentUtils()
Method Detail

canonizeMimeHeaders

public static void canonizeMimeHeaders(OutputStream os,
                                       Map<String,String> headers)
                                throws IOException
Throws:
IOException

unfoldWhitespace

public static String unfoldWhitespace(String text)

unfold

public static String unfold(String text)

decodeRfc2184

public static String decodeRfc2184(String text)
                            throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

concatParamValues

public static String concatParamValues(String a,
                                       String b)

quote

public static String quote(String text)

unquoteInnerText

public static String unquoteInnerText(String text)

uncomment

public static String uncomment(String text)

readAndReplaceEncryptedAttachmentHeaders

public static void readAndReplaceEncryptedAttachmentHeaders(Map<String,String> headers,
                                                            InputStream attachmentInputStream)
                                                     throws IOException,
                                                            WSSecurityException
Throws:
IOException
WSSecurityException

setupAttachmentDecryptionStream

public static InputStream setupAttachmentDecryptionStream(String encAlgo,
                                                          Cipher cipher,
                                                          Key key,
                                                          InputStream inputStream)
                                                   throws WSSecurityException
Throws:
WSSecurityException

setupAttachmentEncryptionStream

public static InputStream setupAttachmentEncryptionStream(Cipher cipher,
                                                          boolean complete,
                                                          Attachment attachment,
                                                          Map<String,String> headers)
                                                   throws WSSecurityException
Throws:
WSSecurityException


Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.