Package system.net.mail
Class Attachment
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.net.mail.AttachmentBase
-
- system.net.mail.Attachment
-
- All Implemented Interfaces:
AutoCloseable
,IJCOBridgeReflected
public class Attachment extends AttachmentBase
The base .NET class managing System.Net.Mail.Attachment, System.Net.Mail, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Net.Mail.Attachment
Powered by JCOBridge: more info at https://www.jcobridge.com
- Version:
- 1.14.3.0
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static String
assemblyFullName
Fully assembly qualified name: System.Net.Mail, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51static String
assemblyShortName
Assembly name: System.Net.Mailstatic String
className
Qualified class name: System.Net.Mail.Attachmentstatic JCType
classType
The type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description Attachment()
Attachment(Object instance)
Internal constructor.Attachment(String fileName)
Attachment(String fileName, String mediaType)
Attachment(String fileName, ContentType contentType)
Attachment(Stream contentStream, String name)
Attachment(Stream contentStream, String name, String mediaType)
Attachment(Stream contentStream, ContentType contentType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Attachment
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoAttachment
, a cast assert is made to check if types are compatible.static Attachment
CreateAttachmentFromString(String content, String name)
static Attachment
CreateAttachmentFromString(String content, String name, Encoding contentEncoding, String mediaType)
static Attachment
CreateAttachmentFromString(String content, ContentType contentType)
ContentDisposition
getContentDisposition()
String
getJCOAssemblyName()
Returns the reflected Assembly nameString
getJCOClassName()
Returns the reflected Class nameObject
getJCOInstance()
Returns the instantiated classString
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class TypeString
getName()
Encoding
getNameEncoding()
void
setJCOInstance(JCObject instance)
void
setName(String Name)
void
setNameEncoding(Encoding NameEncoding)
-
Methods inherited from class system.net.mail.AttachmentBase
close, Dispose, getContentId, getContentStream, getContentType, getTransferEncoding, setContentId, setContentType, setTransferEncoding
-
Methods inherited from class org.mases.jcobridge.netreflection.NetObject
Equals, Equals, GetHashCode, GetType, hashCode, toObjectFromArray, toObjectFromArray, toString, ToString, translateException
-
-
-
-
Field Detail
-
assemblyFullName
public static final String assemblyFullName
Fully assembly qualified name: System.Net.Mail, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51- See Also:
- Constant Field Values
-
assemblyShortName
public static final String assemblyShortName
Assembly name: System.Net.Mail- See Also:
- Constant Field Values
-
className
public static final String className
Qualified class name: System.Net.Mail.Attachment- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Attachment
public Attachment(Object instance) throws Throwable
Internal constructor. Use with caution- Throws:
Throwable
-
Attachment
public Attachment(Stream contentStream, ContentType contentType) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, FormatException
-
Attachment
public Attachment(Stream contentStream, String name, String mediaType) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, FormatException, OutOfMemoryException
-
Attachment
public Attachment(Stream contentStream, String name) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, FormatException, OutOfMemoryException
-
Attachment
public Attachment(String fileName, ContentType contentType) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, SerializationException, FormatException, CultureNotFoundException
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
IndexOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ArgumentNullException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
SerializationException
FormatException
CultureNotFoundException
-
Attachment
public Attachment(String fileName, String mediaType) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, SerializationException, FormatException
-
Attachment
public Attachment(String fileName) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, SerializationException, FormatException
-
-
Method Detail
-
getJCOAssemblyName
public String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classAttachmentBase
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classAttachmentBase
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classAttachmentBase
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classAttachmentBase
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classAttachmentBase
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classAttachmentBase
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static Attachment cast(IJCOBridgeReflected from) throws Throwable
Try to cast theIJCOBridgeReflected
instance intoAttachment
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
Attachment
instance- Throws:
Throwable
- in case of error during cast operation
-
CreateAttachmentFromString
public static Attachment CreateAttachmentFromString(String content, ContentType contentType) throws Throwable, ArgumentNullException, ArgumentException, FormatException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, PlatformNotSupportedException, RankException, IndexOutOfRangeException, ArrayTypeMismatchException
-
CreateAttachmentFromString
public static Attachment CreateAttachmentFromString(String content, String name, Encoding contentEncoding, String mediaType) throws Throwable, ArgumentNullException, ArgumentException, FormatException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, PlatformNotSupportedException, RankException, IndexOutOfRangeException, ArrayTypeMismatchException
-
CreateAttachmentFromString
public static Attachment CreateAttachmentFromString(String content, String name) throws Throwable, ArgumentNullException, ArgumentException, FormatException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, PlatformNotSupportedException, RankException, IndexOutOfRangeException, ArrayTypeMismatchException
-
getContentDisposition
public ContentDisposition getContentDisposition() throws Throwable
- Throws:
Throwable
-
setName
public void setName(String Name) throws Throwable, PlatformNotSupportedException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ArgumentNullException, FormatException, ObjectDisposedException, OutOfMemoryException
-
setNameEncoding
public void setNameEncoding(Encoding NameEncoding) throws Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, IndexOutOfRangeException, InvalidOperationException, FormatException
-
-