|
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 | +--com.sssw.srv.mail.AgoMIMEPartByteStream
An abstract subclass of AgoMIMEPart.
It is the base class for other MIME parts whose value is represented as
a stream of bytes (e.g., AgoMIMEPartApplication
, AgoMIMEPartAudio
,
AgoMIMEPartImage
, and AgoMIMEPartVideo
).
Constructor Summary | |
AgoMIMEPartByteStream(String type,
String subtype,
String contentdisposition)
A constructor for the AgoMIMEPartByteStream class. |
|
AgoMIMEPartByteStream(String type,
String subtype,
String contentdisposition,
AgoRFC822HeaderFieldSet headerfieldset)
A constructor for the AgoMIMEPartByteStream class. |
|
AgoMIMEPartByteStream(String type,
String subtype,
String contentdisposition,
AgoRFC822HeaderFieldSet headerfieldset,
AgoEncodingIdentifier encodingidentifier)
A constructor for the AgoMIMEPartByteStream class. |
|
AgoMIMEPartByteStream(String type,
String subtype,
String contentdisposition,
AgoRFC822HeaderFieldSet headerfieldset,
AgoEncodingIdentifier encodingidentifier,
AgoByteStore value)
A constructor for the AgoMIMEPartByteStream class. |
Method Summary | |
AgoMIMEHeaderField |
contentDispositionHeaderField()
Returns the content disposition header or null if it is not available. |
AgoMIMEHeaderField |
contentTransferEncodingHeaderField()
Returns a header field for the content transfer encoding header or null if it is not available. |
AgoMIMEHeaderField |
contentTypeHeaderField()
Returns an AgoMIMEHeaderField for the content type. |
String |
getContentDisposition()
Returns the content disposition as a String. |
AgoEncodingIdentifier |
getEncodingIdentifier()
Returns the identifier of the encoding mechanism. |
AgoByteStore |
getValue()
Returns the value or body of this MIME part. |
void |
setContentDisposition(String contentdisposition)
Sets the content disposition of a MIME part. |
void |
setEncodingIdentifier(AgoEncodingIdentifier encodingidentifier)
Sets the content encoding identifier. |
void |
setValue(AgoByteStore value)
Sets the value or body of this MIME part. |
void |
write(OutputStream outputstream)
Writes the part (including headers) to the specified output stream. |
void |
writeHeaderFields(OutputStream outputstream)
Writes only the header fields to the specified output stream. |
Methods inherited from class com.sssw.srv.mail.AgoMIMEPart |
deleteHeaderField,
getHeaderField,
getHeaderFieldSet,
getNameParameterOnContentType,
setHeaderField,
setHeaderField,
setHeaderFieldSet,
setNameParameterOnContentType,
subtype,
type |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AgoMIMEPartByteStream(String type, String subtype, String contentdisposition)
type
- the type of this MIME part (required, cannot be null). For supported types
see supported types and subtypes.subtype
- the subtype of this MIME part (required, cannot be null).
For supported subtypes see supported types and subtypes.contentdisposition
- the value for the content-disposition header field, or null.
Note that this is an abstract class; call this constructor only to create a derived
subclass.
The encoding will be set to "base64".
super()
.
AgoMIMEPartByteStream part = new AgoMIMEPartByteStream("image", "jpeg", "inline");
public AgoMIMEPartByteStream(String type, String subtype, String contentdisposition, AgoRFC822HeaderFieldSet headerfieldset)
type
- the type of this MIME part (required, cannot be null).
For supported types see supported types and subtypes.subtype
- the subtype of this MIME part (required, cannot be null).
For supported subtypes see supported types and subtypes.contentdisposition
- the value for the content-disposition header field, or null.headerfieldset
- a set of heades for this part, or null.Note that this is an abstract class; call this constructor only to create a derived subclass.
The encoding will be set to "base64".
super()
.
AgoRFC822HeaderFieldSet headers; AgoMIMEPartByteStream part = new AgoMIMEPartByteStream("image", "jpeg", "inline", headers);
AgoRFC822HeaderFieldSet
public AgoMIMEPartByteStream(String type, String subtype, String contentdisposition, AgoRFC822HeaderFieldSet headerfieldset, AgoEncodingIdentifier encodingidentifier)
type
- the type of this MIME part (required, cannot be null).
For supported types see supported types and subtypes.subtype
- the subtype of this MIME part (required, cannot be null).
For supported subtypes see supported types and subtypes.contentdisposition
- the value for the content-disposition header field, or null.headerfieldset
- a set of heades for this part, or null.encodingidentifier
- an encoding identifier for this part.
The default is AgoMIME.MECHANISM_BASE64.
For supported encoding mechanisms see supported encoding mechanisms.
Note that this is an abstract class; call this constructor only to create a derived
subclass.
super()
.
AgoRFC822HeaderFieldSet headers; AgoMIMEPartByteStream part = new AgoMIMEPartByteStream("image", "jpeg", "inline", headers, "base64");
AgoRFC822HeaderFieldSet
public AgoMIMEPartByteStream(String type, String subtype, String contentdisposition, AgoRFC822HeaderFieldSet headerfieldset, AgoEncodingIdentifier encodingidentifier, AgoByteStore value)
type
- the type of this MIME part (required, cannot be null).
For supported types see supported types and subtypes.subtype
- the subtype of this MIME part (required, cannot be null).
For supported subtypes see see supported types and subtypes.contentdisposition
- the value for the content-disposition header field, or null.headerfieldset
- a set of heades for this part, or null.encodingidentifier
- an encoding identifier for this part. The default is AgoMIME.MECHANISM_BASE64.
For supported encoding mechanisms see supported encoding mechanisms.value
- the value for this part, or null.Note that this is an abstract class; call this constructor only to create a derived subclass.
AgoRFC822HeaderFieldSet headers; AgoByteStore bytes; AgoMIMEPartByteStream part = new AgoMIMEPartByteStream("image", "jpeg", "inline", headers, "base64", bytes);
AgoRFC822HeaderFieldSet
,
AgoByteStore
Method Detail |
public AgoByteStore getValue()
AgoByteStore body = part.getValue();
public void setValue(AgoByteStore value)
value
- the value (or body) of this part.part.setValue(someAgoByteStore);
AgoByteStore
public AgoEncodingIdentifier getEncodingIdentifier()
AgoEncodingIdentifier encoding = part.getEncodingIdentifier();
AgoEncodingIdentifier
,
AgoMIMEPartByteStream.setEncodingIdentifier( AgoEncodingIdentifier encodingidentifier )
public void setEncodingIdentifier(AgoEncodingIdentifier encodingidentifier)
encodingidentifier
- the encoding identifier to set (e.g. AgoMIME.MECHANISM_BASE64).
For supported encoding mechanisms see supported encoding mechanisms.part.setEncodingIdentifier("base64");
AgoEncodingIdentifier
,
AgoMIMEPartByteStream.contentTransferEncodingHeaderField()
,
AgoMIMEPartByteStream.getEncodingIdentifier()
public String getContentDisposition()
String cDis = part.getContentDisposition();
AgoMIMEPartByteStream.setContentDisposition( String contentdisposition )
public void setContentDisposition(String contentdisposition)
contentdisposition
- specifies the content disposition to be set (e.g.AgoMIME.DISPOSITION_INLINE).
For supported content dispositions see supported content dispositions.part.setContentDisposition("inline");
AgoMIMEPartByteStream.getContentDisposition()
,
AgoMIMEPartByteStream.contentDispositionHeaderField()
public void write(OutputStream outputstream) throws IOException
outputStream
- specifies the output stream to write to.Overrides write in class AgoMIMEPart.
part.write(someOutputStream);
public void writeHeaderFields(OutputStream outputstream) throws IOException
outputstream
- specifies the output stream.Overrides writeHeaderFields in class AgoMIMEPart.
part.writeHeaderFields(someOutputStream);
AgoMIMEPart.setHeaderField( String name,String body )
,
AgoMIMEPart.getHeaderField( String name )
public AgoMIMEHeaderField contentTypeHeaderField()
Overrides contentTypeHeaderField
in class AgoMIMEPart.
AgoMIMEHeaderField cType = part.contentTypeHeaderField();
AgoMIMEHeaderField
public AgoMIMEHeaderField contentTransferEncodingHeaderField()
Overrides contentTransferEncodingHeaderField
in class AgoMIMEPart
AgoMIMEHeaderField cTrans = part.contentTransferEncodingHeaderField();
AgoMIMEHeaderField
,
AgoMIMEPartByteStream.getEncodingIdentifier()
,
AgoMIMEPartByteStream.setEncodingIdentifier( AgoEncodingIdentifier encodingidentifier )
public AgoMIMEHeaderField contentDispositionHeaderField()
Overrides contentDispositionHeaderField
in class AgoMIMEPart
.
AgoMIMEHeaderField cDis = part.contentDispositionHeaderField();
AgoMIMEHeaderField
,
AgoMIMEPartByteStream.getContentDisposition()
,
AgoMIMEPartByteStream.setContentDisposition(String contentdisposition)
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |