examples.postcard
Class Postcard

java.lang.Object
  extended byexamples.postcard.Postcard
All Implemented Interfaces:
Serializable

public class Postcard
extends Object
implements Serializable

Represents a postcard. This class is simply an aggregation of

See Also:
Serialized Form

Nested Class Summary
(package private)  class Postcard.PrivilegedImageDecoding
          This privileged action decodes an image from a byte array.
(package private)  class Postcard.PrivilegedImageEncoding
          This privileged action stores an image into a byte array.
 
Field Summary
private  Date date_
          Holds the date when the image was taken or obtained.
static int DEFAULT_IMAGE_HEIGHT
          The heigth of the default image.
static int DEFAULT_IMAGE_WIDTH
          The width of the default image.
private  byte[] imageData_
          Holds the image.
private  String location_
          Holds the location where the picture was taken or obtained.
private  String url_
          Holds the server's URL where the picture was taken or obtained.
 
Constructor Summary
Postcard(BufferedImage image, String location, String url)
          Stamps the given image in the upper right corner with the following information: current date and time server's ingate URL servers location name of the agent distingished name in the owner certificate The stamp is written in the lower left corner with white color.
 
Method Summary
private  void debug(Object debugInfo)
           
 Date getDate()
           
 BufferedImage getImage()
           
 String getLocation()
           
 String getURL()
           
private  void stampImage(BufferedImage img)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageData_

private byte[] imageData_
Holds the image. The data type is a work-around since BufferedImage is not serializable.


location_

private String location_
Holds the location where the picture was taken or obtained.


url_

private String url_
Holds the server's URL where the picture was taken or obtained.


date_

private Date date_
Holds the date when the image was taken or obtained.


DEFAULT_IMAGE_WIDTH

public static final int DEFAULT_IMAGE_WIDTH
The width of the default image. Any image loaded by other means, needs NOT to fit this size.

See Also:
Constant Field Values

DEFAULT_IMAGE_HEIGHT

public static final int DEFAULT_IMAGE_HEIGHT
The heigth of the default image. Any image loaded by other means needs NOT to fit this size.

See Also:
Constant Field Values
Constructor Detail

Postcard

public Postcard(BufferedImage image,
                String location,
                String url)
Stamps the given image in the upper right corner with the following information: The stamp is written in the lower left corner with white color.

Method Detail

getDate

public Date getDate()

getImage

public BufferedImage getImage()

getLocation

public String getLocation()

getURL

public String getURL()

stampImage

private void stampImage(BufferedImage img)

debug

private void debug(Object debugInfo)


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.