7.0 Action Request System Java API

com.remedy.arsys.api
Class Attachment

java.lang.Object
  extended bycom.remedy.arsys.api.Attachment

public class Attachment
extends java.lang.Object

The Attachment class is used to get/set the information about attachment fields. This class represents the attachment, or binary large object (blob), stored for the attachment field with the indicated ID on the specified server. The data is returned/set either in a buffer or a file, depending on the type of location.


Field Summary
static int AR_LOC_BUFFER
          AR_LOC_BUFFER specifies that the contents of the blob should be returned/set in a data buffer.
static int AR_LOC_FILENAME
          AR_LOC_FILENAME specifies that the contents of the blob should be returned/set in a file.
 
Constructor Summary
Attachment(java.lang.String name, long nOrigSize, long nCompSize)
           
Attachment(java.lang.String name, long nOrigSize, long nCompSize, byte[] loc)
           
Attachment(java.lang.String name, long nOrigSize, long nCompSize, java.lang.String loc)
           
 
Method Summary
 long getCompressedSize()
          Returns the compressed size of attachment.
 int getLocationType()
          Returns the location type that indicates whether the contents are passed as a file (AR_LOC_FILENAME) or as a buffer (AR_LOC_BUFFER).
 java.lang.String getName()
          Returns name of the attachment.
 long getOriginalSize()
          Returns original size of attachment.
 java.lang.Object getValue()
          Returns value of attachment.
 void setLocationType(int nLoc)
          Sets the location type that indicates whether the contents are passed as a file (AR_LOC_FILENAME) or as a buffer (AR_LOC_BUFFER).
 void setValue(byte[] bytes)
          Sets the buffer (byte[]) in which the content is returned.
 void setValue(java.lang.String strFileName)
          Sets the name of the file in which the attachment is written.
 java.lang.String toString()
          Returns a string description of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AR_LOC_FILENAME

public static final int AR_LOC_FILENAME
AR_LOC_FILENAME specifies that the contents of the blob should be returned/set in a file.

See Also:
Constant Field Values

AR_LOC_BUFFER

public static final int AR_LOC_BUFFER
AR_LOC_BUFFER specifies that the contents of the blob should be returned/set in a data buffer.

See Also:
Constant Field Values
Constructor Detail

Attachment

public Attachment(java.lang.String name,
                  long nOrigSize,
                  long nCompSize,
                  byte[] loc)

Attachment

public Attachment(java.lang.String name,
                  long nOrigSize,
                  long nCompSize,
                  java.lang.String loc)

Attachment

public Attachment(java.lang.String name,
                  long nOrigSize,
                  long nCompSize)
Method Detail

getName

public java.lang.String getName()
Returns name of the attachment.


getOriginalSize

public long getOriginalSize()
Returns original size of attachment.


getCompressedSize

public long getCompressedSize()
Returns the compressed size of attachment.


getLocationType

public int getLocationType()
Returns the location type that indicates whether the contents are passed as a file (AR_LOC_FILENAME) or as a buffer (AR_LOC_BUFFER).


setLocationType

public void setLocationType(int nLoc)
Sets the location type that indicates whether the contents are passed as a file (AR_LOC_FILENAME) or as a buffer (AR_LOC_BUFFER).


getValue

public java.lang.Object getValue()
Returns value of attachment.


setValue

public void setValue(byte[] bytes)
Sets the buffer (byte[]) in which the content is returned.


setValue

public void setValue(java.lang.String strFileName)
Sets the name of the file in which the attachment is written.


toString

public java.lang.String toString()
Returns a string description of the object.


7.0 Action Request System Java API