Package overit.geocall.mail
Class Attachment
java.lang.Object
overit.geocall.mail.Attachment
- All Implemented Interfaces:
DataSource
- Direct Known Subclasses:
DBAttachment,ObjectAttachment,TemporaryFileAttachment
This is an abstract class that manages the type, name and code of an Attachment
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Returns the code of the fileReturns the file nameabstract InputStreamgetName()getType()Returns the type of the filevoidoutput(OutputStream os) voidSets the type of the filetoString()abstract StringuseEncoding(String encoding) Use of the passed encoding
-
Field Details
-
_contentType
-
_fileName
-
_code
-
_type
-
-
Constructor Details
-
Attachment
public Attachment()
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein interfaceDataSource
-
getFilename
Returns the file name- Returns:
- The file name
-
getCode
Returns the code of the file- Returns:
- The code of the file
-
getName
- Specified by:
getNamein interfaceDataSource
-
getType
Returns the type of the file- Returns:
- The type of the file
-
setType
Sets the type of the file- Parameters:
type- String containing the type of the file
-
output
- Parameters:
os- TheOutputStream- Throws:
IOException- If an I/O error occurs
-
getInputStream
- Specified by:
getInputStreamin interfaceDataSource- Throws:
IOException
-
getOutputStream
- Specified by:
getOutputStreamin interfaceDataSource- Throws:
IOException
-
useEncoding
Use of the passed encoding- Parameters:
encoding- The encoding- Returns:
- The encoding in use
-
toString
-