Package com.logicaldoc.core.communication

# Class EMailAttachment

java.lang.Object
com.logicaldoc.core.communication.EMailAttachment

All Implemented Interfaces:
  `Serializable`

public class EMailAttachment extends Object implements Serializable
An attachment of an email message

Author:
  Michael Scholz, Alessandro Gasparini - LogicalDOC
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`EMailAttachment()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getContentEncoding()`
`String`
`getContentType()`
`byte[]`
`getData()`
`String`
`getDisposition()`
`String`
`getFileName()`
`String`
`getIcon()`
`String`
`getMimeType()`
`long`
`getSize()`
`String`
`parseContent()`
Parse the attachment extracting the text using the parser configured for this specific filename
`String`
`parseContent(Long tenantId, Locale locale, String encoding)`
Parse the attachment extracting the text using the parser configured for this specific filename
`void`
`setContentEncoding(String contentEncoding)`
`void`
`setContentType(String contentType)`
`void`
`setData(byte[] data)`
`void`
`setDisposition(String disposition)`
`void`
`setFileName(String fileName)`
`void`
`setIcon(String icon)`
`void`
`setMimeType(String string)`
`void`
`setSize(long size)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### EMailAttachment

public EMailAttachment()

## Method Details

### getIcon

public String getIcon()

### setIcon

public void setIcon(String icon)

### getMimeType

public String getMimeType()

### setMimeType

public void setMimeType(String string)

### getFileName

public String getFileName()

### setFileName

public void setFileName(String fileName)

### getData

public byte[] getData()

### setData

public void setData(byte[] data)

### getSize

public long getSize()

### setSize

public void setSize(long size)

### parseContent

public String parseContent()
Parse the attachment extracting the text using the parser configured for this specific filename

Returns:
  the extracted text
See Also:
  - `parseContent(Long, Locale, String)`

### parseContent

public String parseContent(Long tenantId, Locale locale, String encoding)
Parse the attachment extracting the text using the parser configured for this specific filename

Parameters:
  `tenantId` - tenant specification(optional, default is `Tenant.DEFAULT_ID`)
  `locale` - the language in which the attachment is written(optional, defaults to english)
  `encoding` - the character encoding(optional, defaults to UTF-8)
Returns:
  the extracted text

### getDisposition

public String getDisposition()

### setDisposition

public void setDisposition(String disposition)

### getContentType

public String getContentType()

### setContentType

public void setContentType(String contentType)

### getContentEncoding

public String getContentEncoding()

### setContentEncoding

public void setContentEncoding(String contentEncoding)