AttachedFile

Inheritance: java.lang.Object, com.aspose.note.Node

All Implemented Interfaces: com.aspose.note.IPageChildNode, com.aspose.note.IOutlineElementChildNode, com.aspose.note.ITaggable

public class AttachedFile extends Node implements IPageChildNode, IOutlineElementChildNode, ITaggable

Represents an attached file.

Constructors

ConstructorDescription
AttachedFile(String path)Initializes a new instance of the AttachedFile class.
AttachedFile(String path, InputStream icon, System.Drawing.Imaging.ImageFormat iconFormat)Initializes a new instance of the AttachedFile class.
AttachedFile(String fileName, InputStream attachedFileStream)Initializes a new instance of the AttachedFile class.
AttachedFile(String fileName, InputStream attachedFileStream, InputStream icon, System.Drawing.Imaging.ImageFormat iconFormat)Initializes a new instance of the AttachedFile class.
AttachedFile()Initializes a new instance of the AttachedFile class.

Methods

MethodDescription
accept(DocumentVisitor visitor)Accepts the visitor of the node.
getAlignment()Gets the alignment.
getAlternativeTextDescription()Gets or sets a body an alternative text for the icon of the attached file.
getAlternativeTextTitle()Gets or sets a title of alternative text for the icon of the attached file.
getBytes()Gets the binary data for an embedded file.
getExtension()Gets the extension of an embedded file.
getFileName()Gets the name of the embedded file.
getFilePath()Gets the path to the original file.
getHeight()Gets the original height of the embedded file icon.
getHorizontalOffset()Gets the horizontal offset.
getIcon()Gets the binary data for the icon that is associated with the embedded file.
getIconExtension()Gets the extension of the icon.
getLastModifiedTime()Gets the last modified time.
getMaxHeight()Gets the maximum height to display the embedded file icon.
getMaxWidth()Gets the maximum width to display the embedded file icon.
getParsingErrorInfo()Gets the data about error that occurred while accessing the file.
getTags()Gets the list of tags of an attached file.
getText()Gets the text representation of the embedded file.
getVerticalOffset()Gets the vertical offset.
getWidth()Gets the original width of the embedded file icon.
isPrintout()Gets a value indicating whether the view of the file is printout.
isSizeSetByUser()Gets a value indicating whether the value of the size of the icon was explicitly updated by the user.
setAlignment(int value)Sets the alignment.
setAlternativeTextDescription(String value)Gets or sets a body an alternative text for the icon of the attached file.
setAlternativeTextTitle(String value)Gets or sets a title of alternative text for the icon of the attached file.
setHorizontalOffset(float value)Sets the horizontal offset.
setLastModifiedTime(Date value)Sets the last modified time.
setMaxHeight(float value)Sets the maximum height to display the embedded file icon.
setMaxWidth(float value)Sets the maximum width to display the embedded file icon.
setPrintout(boolean value)Sets a value indicating whether the view of the file is printout.
setSizeSetByUser(boolean value)Sets a value indicating whether the value of the size of the icon was explicitly updated by the user.
setText(String value)Sets the text representation of the embedded file.
setVerticalOffset(float value)Sets the vertical offset.

AttachedFile(String path)

public AttachedFile(String path)

Initializes a new instance of the AttachedFile class.

Parameters:

ParameterTypeDescription
pathjava.lang.StringA string that contains the path to the file from which to create the AttachedFile.

AttachedFile(String path, InputStream icon, System.Drawing.Imaging.ImageFormat iconFormat)

public AttachedFile(String path, InputStream icon, System.Drawing.Imaging.ImageFormat iconFormat)

Initializes a new instance of the AttachedFile class.

Parameters:

ParameterTypeDescription
pathjava.lang.StringA string that contains the path to the file from which to create the AttachedFile.
iconjava.io.InputStreamAn icon for the attached file.
iconFormatcom.aspose.ms.System.Drawing.Imaging.ImageFormat

AttachedFile(String fileName, InputStream attachedFileStream)

public AttachedFile(String fileName, InputStream attachedFileStream)

Initializes a new instance of the AttachedFile class.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringA name of the attached file.
attachedFileStreamjava.io.InputStreamA stream which contains the attached file bytes.

AttachedFile(String fileName, InputStream attachedFileStream, InputStream icon, System.Drawing.Imaging.ImageFormat iconFormat)

public AttachedFile(String fileName, InputStream attachedFileStream, InputStream icon, System.Drawing.Imaging.ImageFormat iconFormat)

Initializes a new instance of the AttachedFile class.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringA name of the attached file.
attachedFileStreamjava.io.InputStreamA stream which contains the attached file bytes.
iconjava.io.InputStreamAn icon for the attached file.
iconFormatcom.aspose.ms.System.Drawing.Imaging.ImageFormatA format of the attached file icon.

AttachedFile()

public AttachedFile()

Initializes a new instance of the AttachedFile class.

accept(DocumentVisitor visitor)

public void accept(DocumentVisitor visitor)

Accepts the visitor of the node.

Parameters:

ParameterTypeDescription
visitorDocumentVisitorThe object of a class derived from the DocumentVisitor.

getAlignment()

public int getAlignment()

Gets the alignment.

Returns: int

getAlternativeTextDescription()

public final String getAlternativeTextDescription()

Gets or sets a body an alternative text for the icon of the attached file.

Returns: java.lang.String

getAlternativeTextTitle()

public final String getAlternativeTextTitle()

Gets or sets a title of alternative text for the icon of the attached file.

Returns: java.lang.String

getBytes()

public byte[] getBytes()

Gets the binary data for an embedded file.

Returns: byte[]

getExtension()

public String getExtension()

Gets the extension of an embedded file.

Returns: java.lang.String

getFileName()

public String getFileName()

Gets the name of the embedded file.

Returns: java.lang.String

getFilePath()

public String getFilePath()

Gets the path to the original file.

Returns: java.lang.String

getHeight()

public float getHeight()

Gets the original height of the embedded file icon.

Returns: float

getHorizontalOffset()

public float getHorizontalOffset()

Gets the horizontal offset.

Returns: float

getIcon()

public byte[] getIcon()

Gets the binary data for the icon that is associated with the embedded file.

Returns: byte[]

getIconExtension()

public String getIconExtension()

Gets the extension of the icon.

Returns: java.lang.String

getLastModifiedTime()

public Date getLastModifiedTime()

Gets the last modified time.

Returns: java.util.Date

getMaxHeight()

public float getMaxHeight()

Gets the maximum height to display the embedded file icon.

Returns: float

getMaxWidth()

public float getMaxWidth()

Gets the maximum width to display the embedded file icon.

Returns: float

getParsingErrorInfo()

public final ParsingErrorInfo getParsingErrorInfo()

Gets the data about error that occurred while accessing the file.

Returns: ParsingErrorInfo

getTags()

public final System.Collections.Generic.List<ITag> getTags()

Gets the list of tags of an attached file.

Returns: com.aspose.ms.System.Collections.Generic.List<com.aspose.note.ITag>

getText()

public String getText()

Gets the text representation of the embedded file. The string MUST NOT contain any characters of the value 10 (line feed) or 13 (carriage return).

Returns: java.lang.String

getVerticalOffset()

public float getVerticalOffset()

Gets the vertical offset.

Returns: float

getWidth()

public float getWidth()

Gets the original width of the embedded file icon.

Returns: float

isPrintout()

public boolean isPrintout()

Gets a value indicating whether the view of the file is printout.

Returns: boolean

isSizeSetByUser()

public boolean isSizeSetByUser()

Gets a value indicating whether the value of the size of the icon was explicitly updated by the user.

Returns: boolean

setAlignment(int value)

public void setAlignment(int value)

Sets the alignment.

Parameters:

ParameterTypeDescription
valueintAlignment’s value.

setAlternativeTextDescription(String value)

public final void setAlternativeTextDescription(String value)

Gets or sets a body an alternative text for the icon of the attached file.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setAlternativeTextTitle(String value)

public final void setAlternativeTextTitle(String value)

Gets or sets a title of alternative text for the icon of the attached file.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setHorizontalOffset(float value)

public void setHorizontalOffset(float value)

Sets the horizontal offset.

Parameters:

ParameterTypeDescription
valuefloatOffsets’s value.

setLastModifiedTime(Date value)

public void setLastModifiedTime(Date value)

Sets the last modified time.

Parameters:

ParameterTypeDescription
valuejava.util.DateDate’s value.

setMaxHeight(float value)

public void setMaxHeight(float value)

Sets the maximum height to display the embedded file icon.

Parameters:

ParameterTypeDescription
valuefloatMaximum height’s value.

setMaxWidth(float value)

public void setMaxWidth(float value)

Sets the maximum width to display the embedded file icon.

Parameters:

ParameterTypeDescription
valuefloatMaximum width’s value.

setPrintout(boolean value)

public void setPrintout(boolean value)

Sets a value indicating whether the view of the file is printout.

Parameters:

ParameterTypeDescription
valuebooleanNew value.

setSizeSetByUser(boolean value)

public void setSizeSetByUser(boolean value)

Sets a value indicating whether the value of the size of the icon was explicitly updated by the user.

Parameters:

ParameterTypeDescription
valuebooleanNew value.

setText(String value)

public void setText(String value)

Sets the text representation of the embedded file. The string MUST NOT contain any characters of the value 10 (line feed) or 13 (carriage return).

Parameters:

ParameterTypeDescription
valuejava.lang.StringText’s value.

setVerticalOffset(float value)

public void setVerticalOffset(float value)

Sets the vertical offset.

Parameters:

ParameterTypeDescription
valuefloatOffset’s value.