SCCT.JavaSubscriber
Class SCCT_ImagePackage

java.lang.Object
  extended by SCCT.JavaSubscriber.SCCT_AbstractPackage
      extended by SCCT.JavaSubscriber.SCCT_AbstractDataPackage
          extended by SCCT.JavaSubscriber.SCCT_ImagePackage

public class SCCT_ImagePackage
extends SCCT_AbstractDataPackage

This class represents an image package. *This class is available only in PRO version.*


Field Summary
static int FORMAT_BMP
           
static int FORMAT_JPEG
           
static int FORMAT_PNG
           
static int FORMAT_TIFF
           
 
Constructor Summary
SCCT_ImagePackage(byte[] image, int format)
           
SCCT_ImagePackage(byte[] image, int format, java.lang.String description, java.lang.String[] attributes)
           
SCCT_ImagePackage(java.io.File image, int format)
           
SCCT_ImagePackage(java.io.File image, int format, java.lang.String description, java.lang.String[] attributes)
           
 
Method Summary
 java.lang.String[] getAttributes()
          Gets an array of attributes associated with the image.
 java.awt.image.BufferedImage getBufferedImage()
          Returns a BufferedImage object of the java.awt.image.BufferedImage package that rappresents the image.
 byte[] getBytes()
          Gets a sequence of bytes that represents the image.
 java.lang.String getDescription()
          Gets the description associated with the image.
 int getImageFormat()
          Return the fortmat of the image.
 
Methods inherited from class SCCT.JavaSubscriber.SCCT_AbstractDataPackage
getSourceDescription, getSourceId
 
Methods inherited from class SCCT.JavaSubscriber.SCCT_AbstractPackage
getCalendar, getPackageNumber
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_PNG

public static final int FORMAT_PNG
See Also:
Constant Field Values

FORMAT_JPEG

public static final int FORMAT_JPEG
See Also:
Constant Field Values

FORMAT_BMP

public static final int FORMAT_BMP
See Also:
Constant Field Values

FORMAT_TIFF

public static final int FORMAT_TIFF
See Also:
Constant Field Values
Constructor Detail

SCCT_ImagePackage

public SCCT_ImagePackage(java.io.File image,
                         int format,
                         java.lang.String description,
                         java.lang.String[] attributes)
                  throws java.io.IOException
Parameters:
image - It's a File object of java.io package that represents the image to send.
format - The format of the image.
This value can be:
  • ImagePackage.FORMAT_PNG
  • ImagePackage.FORMAT_JPEG
  • ImagePackage.FORMAT_BMP
  • ImagePackage.FORMAT_TIFF
description - It's the description to associate with the image.
attributes - It's the array of attributes to send with the image.
Throws:
java.io.IOException - If an error occurs, in order to open the file.

SCCT_ImagePackage

public SCCT_ImagePackage(java.io.File image,
                         int format)
                  throws java.io.IOException
Parameters:
image - It's a File object of java.io package that represents the image to send.
format - The format of the image.
Throws:
java.io.IOException - If an error occurs, in order to open the file.

SCCT_ImagePackage

public SCCT_ImagePackage(byte[] image,
                         int format)
Parameters:
image - It's the image in a byte array.
format - The format of the image.

SCCT_ImagePackage

public SCCT_ImagePackage(byte[] image,
                         int format,
                         java.lang.String description,
                         java.lang.String[] attributes)
Parameters:
image - It's the image to send in a byte array.
format - The format of the image.
description - It's the description to associate with the image.
attributes - It's the array of attributes to send with the image.
Method Detail

getImageFormat

public int getImageFormat()
Return the fortmat of the image. This value can be:

Returns:

getDescription

public java.lang.String getDescription()
Gets the description associated with the image.

Returns:
The description of the image.

getBytes

public byte[] getBytes()
Gets a sequence of bytes that represents the image.

Returns:
The byte array of the image.

getAttributes

public java.lang.String[] getAttributes()
Gets an array of attributes associated with the image.

Returns:
A string array of attributes.

getBufferedImage

public java.awt.image.BufferedImage getBufferedImage()
                                              throws java.io.IOException
Returns a BufferedImage object of the java.awt.image.BufferedImage package that rappresents the image.

Returns:
a java.awt.image.BufferedImage object.
Throws:
java.io.IOException - If an error occurs, in order to decode the image.