Package org.apache.wss4j.common.util
Class AttachmentUtils
java.lang.Object
org.apache.wss4j.common.util.AttachmentUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final charstatic final charstatic final charstatic final char -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcanonizeMimeHeaders(OutputStream os, Map<String, String> headers) static StringconcatParamValues(String a, String b) static StringdecodeRfc2184(String text) static StringgetAttachmentId(String xopUri) static byte[]getBytesFromAttachment(String xopUri, CallbackHandler attachmentCallbackHandler, boolean removeAttachments) static Stringstatic voidreadAndReplaceEncryptedAttachmentHeaders(Map<String, String> headers, InputStream attachmentInputStream) static InputStreamsetupAttachmentDecryptionStream(String encAlgo, Cipher cipher, Key key, InputStream inputStream) static InputStreamsetupAttachmentEncryptionStream(Cipher cipher, boolean complete, Attachment attachment, Map<String, String> headers) static voidstoreBytesInAttachment(Element parentElement, Document doc, String attachmentId, byte[] bytes, CallbackHandler attachmentCallbackHandler) static Stringstatic Stringstatic StringunfoldWhitespace(String text) static StringunquoteInnerText(String text)
-
Field Details
-
MIME_HEADER_CONTENT_DESCRIPTION
- See Also:
-
MIME_HEADER_CONTENT_DISPOSITION
- See Also:
-
MIME_HEADER_CONTENT_ID
- See Also:
-
MIME_HEADER_CONTENT_LOCATION
- See Also:
-
MIME_HEADER_CONTENT_TYPE
- See Also:
-
DOUBLE_QUOTE
public static final char DOUBLE_QUOTE- See Also:
-
SINGLE_QUOTE
public static final char SINGLE_QUOTE- See Also:
-
LEFT_PARENTHESIS
public static final char LEFT_PARENTHESIS- See Also:
-
RIGHT_PARENTHESIS
public static final char RIGHT_PARENTHESIS- See Also:
-
CARRIAGE_RETURN
public static final char CARRIAGE_RETURN- See Also:
-
LINEFEED
public static final char LINEFEED- See Also:
-
SPACE
public static final char SPACE- See Also:
-
HTAB
public static final char HTAB- See Also:
-
EQUAL
public static final char EQUAL- See Also:
-
ASTERISK
public static final char ASTERISK- See Also:
-
SEMICOLON
public static final char SEMICOLON- See Also:
-
BACKSLASH
public static final char BACKSLASH- See Also:
-
PARAM_CHARSET
- See Also:
-
PARAM_CREATION_DATE
- See Also:
-
PARAM_FILENAME
- See Also:
-
PARAM_MODIFICATION_DATE
- See Also:
-
PARAM_PADDING
- See Also:
-
PARAM_READ_DATE
- See Also:
-
PARAM_SIZE
- See Also:
-
PARAM_TYPE
- See Also:
-
ALL_PARAMS
-
-
Method Details
-
canonizeMimeHeaders
public static void canonizeMimeHeaders(OutputStream os, Map<String, String> headers) throws IOException- Throws:
IOException
-
unfoldWhitespace
-
unfold
-
decodeRfc2184
- Throws:
UnsupportedEncodingException
-
concatParamValues
-
quote
-
unquoteInnerText
-
uncomment
-
readAndReplaceEncryptedAttachmentHeaders
public static void readAndReplaceEncryptedAttachmentHeaders(Map<String, String> headers, InputStream attachmentInputStream) throws IOException, WSSecurityException- Throws:
IOExceptionWSSecurityException
-
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
-
getBytesFromAttachment
public static byte[] getBytesFromAttachment(String xopUri, CallbackHandler attachmentCallbackHandler, boolean removeAttachments) throws WSSecurityException - Throws:
WSSecurityException
-
getAttachmentId
- Throws:
WSSecurityException
-
storeBytesInAttachment
public static void storeBytesInAttachment(Element parentElement, Document doc, String attachmentId, byte[] bytes, CallbackHandler attachmentCallbackHandler) throws WSSecurityException - Throws:
WSSecurityException
-