org.ws4d.java.attachment
Class DefaultAttachmentFactory

java.lang.Object
  extended by org.ws4d.java.attachment.DefaultAttachmentFactory
All Implemented Interfaces:
AttachmentFactory

public class DefaultAttachmentFactory
extends java.lang.Object
implements AttachmentFactory


Constructor Summary
DefaultAttachmentFactory()
           
 
Method Summary
 OutgoingAttachment createFileAttachment(java.lang.String filePath)
           
 OutgoingAttachment createFileAttachment(java.lang.String filePath, InternetMediaType contentType)
           
 OutgoingAttachment createFileAttachment(java.lang.String filePath, java.lang.String contentType)
           
 OutgoingAttachment createFileAttachment(java.lang.String filePath, java.lang.String contentId, InternetMediaType contentType)
           
 OutgoingAttachment createFileAttachment(java.lang.String filePath, java.lang.String contentId, java.lang.String contentType)
           
 OutgoingAttachment createMemoryAttachment(byte[] bytes)
           
 OutgoingAttachment createMemoryAttachment(byte[] bytes, InternetMediaType contentType)
           
 OutgoingAttachment createMemoryAttachment(byte[] bytes, java.lang.String contentType)
           
 OutgoingAttachment createMemoryAttachment(byte[] bytes, java.lang.String contentId, InternetMediaType contentType)
           
 OutgoingAttachment createMemoryAttachment(byte[] bytes, java.lang.String contentId, java.lang.String contentType)
           
 OutgoingAttachment createStreamAttachment(java.io.InputStream in)
           
 OutgoingAttachment createStreamAttachment(java.io.InputStream in, InternetMediaType contentType)
           
 OutgoingAttachment createStreamAttachment(java.io.InputStream in, java.lang.String contentType)
           
 OutgoingAttachment createStreamAttachment(java.io.InputStream in, java.lang.String contentId, InternetMediaType contentType)
           
 OutgoingAttachment createStreamAttachment(java.io.InputStream in, java.lang.String contentId, java.lang.String contentType)
           
 OutgoingOutputStreamAttachment createStreamAttachment(InternetMediaType contentType)
           
 OutgoingOutputStreamAttachment createStreamAttachment(java.lang.String contentType)
           
 OutgoingOutputStreamAttachment createStreamAttachment(java.lang.String contentId, InternetMediaType contentType)
           
 OutgoingOutputStreamAttachment createStreamAttachment(java.lang.String contentId, InternetMediaType contentType, java.lang.String transferEncoding)
           
 OutgoingOutputStreamAttachment createStreamAttachment(java.lang.String contentId, java.lang.String contentType)
           
 Iterator getStreamingMediaTypes()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAttachmentFactory

public DefaultAttachmentFactory()
Method Detail

createFileAttachment

public OutgoingAttachment createFileAttachment(java.lang.String filePath)
Specified by:
createFileAttachment in interface AttachmentFactory
Parameters:
filePath -
Returns:

createFileAttachment

public OutgoingAttachment createFileAttachment(java.lang.String filePath,
                                               InternetMediaType contentType)
Specified by:
createFileAttachment in interface AttachmentFactory
Parameters:
filePath -
contentType -
Returns:

createFileAttachment

public OutgoingAttachment createFileAttachment(java.lang.String filePath,
                                               java.lang.String contentType)
Specified by:
createFileAttachment in interface AttachmentFactory
Parameters:
filePath -
contentType -
Returns:

createFileAttachment

public OutgoingAttachment createFileAttachment(java.lang.String filePath,
                                               java.lang.String contentId,
                                               InternetMediaType contentType)
Specified by:
createFileAttachment in interface AttachmentFactory
Parameters:
filePath -
contentId -
contentType -
Returns:

createFileAttachment

public OutgoingAttachment createFileAttachment(java.lang.String filePath,
                                               java.lang.String contentId,
                                               java.lang.String contentType)
Specified by:
createFileAttachment in interface AttachmentFactory
Parameters:
filePath -
contentId -
contentType -
Returns:

createMemoryAttachment

public OutgoingAttachment createMemoryAttachment(byte[] bytes)
Specified by:
createMemoryAttachment in interface AttachmentFactory
Parameters:
bytes -
Returns:

createMemoryAttachment

public OutgoingAttachment createMemoryAttachment(byte[] bytes,
                                                 InternetMediaType contentType)
Specified by:
createMemoryAttachment in interface AttachmentFactory
Parameters:
bytes -
contentType -
Returns:

createMemoryAttachment

public OutgoingAttachment createMemoryAttachment(byte[] bytes,
                                                 java.lang.String contentType)
Specified by:
createMemoryAttachment in interface AttachmentFactory
Parameters:
bytes -
contentType -
Returns:

createMemoryAttachment

public OutgoingAttachment createMemoryAttachment(byte[] bytes,
                                                 java.lang.String contentId,
                                                 InternetMediaType contentType)
Specified by:
createMemoryAttachment in interface AttachmentFactory
Parameters:
bytes -
contentId -
contentType -
Returns:

createMemoryAttachment

public OutgoingAttachment createMemoryAttachment(byte[] bytes,
                                                 java.lang.String contentId,
                                                 java.lang.String contentType)
Specified by:
createMemoryAttachment in interface AttachmentFactory
Parameters:
bytes -
contentId -
contentType -
Returns:

createStreamAttachment

public OutgoingAttachment createStreamAttachment(java.io.InputStream in)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
in -
Returns:

createStreamAttachment

public OutgoingAttachment createStreamAttachment(java.io.InputStream in,
                                                 InternetMediaType contentType)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
in -
contentType -
Returns:

createStreamAttachment

public OutgoingAttachment createStreamAttachment(java.io.InputStream in,
                                                 java.lang.String contentType)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
in -
contentType -
Returns:

createStreamAttachment

public OutgoingAttachment createStreamAttachment(java.io.InputStream in,
                                                 java.lang.String contentId,
                                                 InternetMediaType contentType)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
in -
contentId -
contentType -
Returns:

createStreamAttachment

public OutgoingAttachment createStreamAttachment(java.io.InputStream in,
                                                 java.lang.String contentId,
                                                 java.lang.String contentType)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
in -
contentId -
contentType -
Returns:

createStreamAttachment

public OutgoingOutputStreamAttachment createStreamAttachment(InternetMediaType contentType)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
contentType -
Returns:

createStreamAttachment

public OutgoingOutputStreamAttachment createStreamAttachment(java.lang.String contentType)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
contentType -
Returns:

createStreamAttachment

public OutgoingOutputStreamAttachment createStreamAttachment(java.lang.String contentId,
                                                             InternetMediaType contentType)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
contentId -
contentType -
Returns:

createStreamAttachment

public OutgoingOutputStreamAttachment createStreamAttachment(java.lang.String contentId,
                                                             java.lang.String contentType)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
contentId -
contentType -
Returns:

createStreamAttachment

public OutgoingOutputStreamAttachment createStreamAttachment(java.lang.String contentId,
                                                             InternetMediaType contentType,
                                                             java.lang.String transferEncoding)
Specified by:
createStreamAttachment in interface AttachmentFactory
Parameters:
contentId -
contentType -
trasferEncoding -
Returns:

getStreamingMediaTypes

public Iterator getStreamingMediaTypes()
Specified by:
getStreamingMediaTypes in interface AttachmentFactory
Returns: