Package overit.geocall.mail
Class ObjectAttachment
java.lang.Object
overit.geocall.mail.Attachment
overit.geocall.mail.ObjectAttachment
- All Implemented Interfaces:
DataSource
This class defines a basic object attachment
-
Field Summary
FieldsFields inherited from class overit.geocall.mail.Attachment
_code, _contentType, _fileName, _type -
Constructor Summary
ConstructorsConstructorDescriptionObjectAttachment(String code, String fileName, String type, String contentType, byte[] bb) Creates a new ObjectAttachmentCreates a new ObjectAttachmentCreates a new ObjectAttachmentCreates a new ObjectAttachmentCreates a new ObjectAttachment -
Method Summary
Methods inherited from class overit.geocall.mail.Attachment
getCode, getContentType, getFilename, getName, getOutputStream, getType, output, setType, toString
-
Field Details
-
_useEncoding
-
_o
-
-
Constructor Details
-
ObjectAttachment
public ObjectAttachment(String code, String fileName, String type, String contentType, ByteCache bc) throws IOException Creates a new ObjectAttachment- Parameters:
code- The code of the filefileName- The file nametype- The type of the filecontentType- The content typebc- The ByteCache of the object- Throws:
IOException- If an I/O error occurs
-
ObjectAttachment
public ObjectAttachment(String code, String fileName, String type, String contentType, UpFile uf) throws IOException Creates a new ObjectAttachment- Parameters:
code- The code of the filefileName- The file nametype- The type of the filecontentType- The content typeuf- The UpFile- Throws:
IOException- If an I/O error occurs
-
ObjectAttachment
public ObjectAttachment(String code, String fileName, String type, String contentType, File f) throws IOException Creates a new ObjectAttachment- Parameters:
code- The code of the filefileName- The file nametype- The type of the filecontentType- The content typef- The File- Throws:
IOException- If an I/O error occurs
-
ObjectAttachment
public ObjectAttachment(String code, String fileName, String type, String contentType, byte[] bb) throws IOException Creates a new ObjectAttachment- Parameters:
code- The code of the filefileName- The file nametype- The type of the filecontentType- The content typebb- The array of bytes of the object- Throws:
IOException- If an I/O error occurs
-
ObjectAttachment
public ObjectAttachment(String code, String fileName, String type, String contentType, String text) throws IOException Creates a new ObjectAttachment- Parameters:
code- The code of the filefileName- The file nametype- The type of the filecontentType- The content typetext- The text of the object- Throws:
IOException- If an I/O error occurs
-
-
Method Details
-
useEncoding
Description copied from class:AttachmentUse of the passed encoding- Specified by:
useEncodingin classAttachment- Parameters:
encoding- The encoding- Returns:
- The encoding in use
-
getInputStream
- Specified by:
getInputStreamin interfaceDataSource- Specified by:
getInputStreamin classAttachment- Throws:
IOException
-