|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sssw.srv.mail.AgoMIMEPart
Abstract base class of all other MIME parts. It contains the MIME part type and subtype as well as the set of header fields defined in the MIME part.
Constructor Summary | |
AgoMIMEPart(String type,
String subtype)
A constructor for the AgoMIMEPart class. |
|
AgoMIMEPart(String type,
String subtype,
AgoRFC822HeaderFieldSet headerfieldset)
A constructor for the AgoMIMEPart class. |
Method Summary | |
AgoMIMEHeaderField |
contentDispositionHeaderField()
Returns the content disposition header or null if there is none. |
AgoMIMEHeaderField |
contentTransferEncodingHeaderField()
Returns a header field for the content transfer encoding header or null if there is none. |
AgoMIMEHeaderField |
contentTypeHeaderField()
Returns an AgoMIMEHeaderField for the content type. |
void |
deleteHeaderField(String name)
Deletes the specified header field. |
AgoRFC822HeaderField |
getHeaderField(String name)
Obtains a header field specified by name. |
AgoRFC822HeaderFieldSet |
getHeaderFieldSet()
Gets the set of all header fields in this MIME part. |
boolean |
getNameParameterOnContentType()
Get the value of the option that defines on which header the name of a file attachment is specified |
void |
setHeaderField(AgoRFC822HeaderField headerfield)
Sets a header field. |
void |
setHeaderField(String name,
String body)
Sets a header field to a String value. |
void |
setHeaderFieldSet(AgoRFC822HeaderFieldSet headerfieldset)
Assigns the set of headers for this MIME part. |
void |
setNameParameterOnContentType(boolean nameparameteroncontenttype)
Set the option which controls whether the "name" parameter is added to the MIME Content-Type field. |
String |
subtype()
Returns the MIME subtype of this part. |
String |
type()
Returns the MIME type of this part. |
void |
write(OutputStream outputstream)
Writes this part (including headers) to the specified output stream. |
void |
writeHeaderFields(OutputStream output)
Writes only the header fields to the specified output stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AgoMIMEPart(String type, String subtype)
type
- the content-type of this part.
See supported types and subtypes.subtype
- the content subtype of this part.Note that AgoMIMEPart() is an overloaded method. Use this version when there is no need to specify additional headers. Also note that this is an abstract class; call this constructor only to create a derived subclass.
public AgoMIMEPart(String type, String subtype, AgoRFC822HeaderFieldSet headerfieldset)
type
- the content-type of this part.
See supported types and subtypes.subtype
- the content subtype of this part.headerfieldset
- the headers of this MIME part aside from content-type.Note that AgoMIMEPart() is an overloaded constructor. Use this version to specify a set of header fields. Also note that this is an abstract class; call this constructor only to create a derived subclass.
Method Detail |
public String type()
String type = part.type();
AgoMIMEPart.subtype()
public String subtype()
String type = part.subtype();
AgoMIMEPart.type()
public AgoRFC822HeaderField getHeaderField(String name)
name
- the header field to obtain.AgoRFC822HeaderField header = part.getHeaderField("Content-Disposition");
AgoMIMEPart.setHeaderField( AgoRFC822HeaderField headerfield )
public void setHeaderField(AgoRFC822HeaderField headerfield)
headerfield
- the header field to set.This method overwrites the old value of the header field. Note that this method is an overloaded method. This version is used when working with an AgoRFC822HeaderField object.
AgoRFC822HeaderField header; part.setHeaderField(header);
AgoMIMEPart.getHeaderField( String name )
public void setHeaderField(String name, String body)
name
- the name of the header field to set.body
- the value for the named header field.This method overwrites the old value of the header field. Note that this is an overloaded method. This version is used when the name and value are in String format.
part.setHeaderField("Content-Type", "text/html");
AgoMIMEPart.getHeaderField( String name )
public void deleteHeaderField(String name)
name
- the name of the header field to delete.part.deleteHeaderField("Content-Disposition");
AgoMIMEPart.getHeaderField( String name )
,
AgoMIMEPart.setHeaderField( String name, String body )
public AgoRFC822HeaderFieldSet getHeaderFieldSet()
AgoRFC822HeaderFieldSet headers = part.getHeaderFieldSet();
AgoMIMEPart.setHeaderFieldSet( AgoRFC822HeaderFieldSet headerfieldset )
public void setHeaderFieldSet(AgoRFC822HeaderFieldSet headerfieldset)
headerfieldset
- the headerfieldset.AgoRFC822HeaderFieldSet headers; part.setHeaderFieldSet(headers);
AgoRFC822HeaderFieldSet
public void write(OutputStream outputstream) throws IOException
outputStream
- the output stream to write to.part.write(outputStream);
public void writeHeaderFields(OutputStream output) throws IOException
outputstream
- the output stream.part.writeHeaderFields(outputStream);
AgoMIMEPart.setHeaderField( String name, String body )
,
AgoMIMEPart.getHeaderField( String name )
public AgoMIMEHeaderField contentTypeHeaderField()
AgoMIMEHeaderField cType = mPart.contentTypeHeaderField();
AgoMIMEHeaderField
public AgoMIMEHeaderField contentTransferEncodingHeaderField()
AgoMIMEHeaderField cTra = part.contentTransferEncodingHeaderField();
AgoMIMEHeaderField
,
AgoMIMEPartByteStream.getEncodingIdentifier()
,
AgoMIMEPartByteStream.setEncodingIdentifier( AgoEncodingIdentifier encodingidentifier )
public AgoMIMEHeaderField contentDispositionHeaderField()
AgoMIMEHeaderField cDis = part.contentDispositionHeaderField();
AgoMIMEHeaderField
,
AgoMIMEPartByteStream.getContentDisposition()
,
AgoMIMEPartByteStream.setContentDisposition( String contentdisposition )
public boolean getNameParameterOnContentType()
Normally, the name of a file attachment, image, etc. should be specified in the "filename" parameter of the Content-Disposition header field as per RFC1806. However, some older mail UA's want to attach it to the Content-Type header, so we allow it here simply as an option in order to increase compatibility with these programs.
AgoMIMEPart.setNameParameterOnContentType( boolean nameparameteroncontenttype )
public void setNameParameterOnContentType(boolean nameparameteroncontenttype)
nameparameteroncontenttype
- when true the name parameter is added.Normally, the name of a file attachment, image, etc. should be specified in the "filename" parameter of the Content-Disposition header field as per RFC1806. However, some older mail UA's want to attach it to the Content-Type header, so we allow it here simply as an option in order to increase compatibility with these programs.
AgoMIMEPart.getNameParameterOnContentType()
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |