Attachment

Inheritance: java.lang.Object

public abstract class Attachment

Represents a file attached to a document.

Learn more

Methods

Method Description
getDocumentInfo() Gets the information about a document stored in the attached file.
getContent() Gets the attached file content.
setContent(byte[] value) Sets the attached file content.
createWatermarker() Loads a content from the attached file.
createWatermarker(LoadOptions loadOptions) Loads a content from the attached file with the specified load options.
createWatermarker(LoadOptions loadOptions, WatermarkerSettings watermarkerSettings) Loads a content from the attached file with the specified load options and settings.
updateContent(Watermarker updatedVersion) Updates the attached content.

getDocumentInfo()

public final IDocumentInfo getDocumentInfo()

Gets the information about a document stored in the attached file.

Returns: IDocumentInfo - The [IDocumentInfo](../../com.groupdocs.watermark.common/idocumentinfo) instance that contains detected information.

getContent()

public abstract byte[] getContent()

Gets the attached file content.

Returns: byte[] - The attached file content.

setContent(byte[] value)

public abstract void setContent(byte[] value)

Sets the attached file content.

Parameters:

Parameter Type Description
value byte[] The attached file content.

createWatermarker()

public final Watermarker createWatermarker()

Loads a content from the attached file.

Returns: Watermarker - The instance of appropriate descendant of [Content](../../com.groupdocs.watermark.contents/content) class.

createWatermarker(LoadOptions loadOptions)

public final Watermarker createWatermarker(LoadOptions loadOptions)

Loads a content from the attached file with the specified load options.

Parameters:

Parameter Type Description
loadOptions LoadOptions Additional options to use when loading an attachment content.

Returns: Watermarker - The instance of appropriate descendant of [Content](../../com.groupdocs.watermark.contents/content) class.

createWatermarker(LoadOptions loadOptions, WatermarkerSettings watermarkerSettings)

public final Watermarker createWatermarker(LoadOptions loadOptions, WatermarkerSettings watermarkerSettings)

Loads a content from the attached file with the specified load options and settings.

Parameters:

Parameter Type Description
loadOptions LoadOptions Additional options to use when loading an attachment content.
watermarkerSettings WatermarkerSettings Additional settings to use when working with loaded document.

Returns: Watermarker - The instance of appropriate descendant of [Content](../../com.groupdocs.watermark.contents/content) class.

updateContent(Watermarker updatedVersion)

public final void updateContent(Watermarker updatedVersion)

Updates the attached content.

Parameters:

Parameter Type Description
updatedVersion Watermarker The updated version of the content.