com.partnersoft.maps.rover
Class RoverImageFile

java.lang.Object
  extended by com.partnersoft.maps.rover.RoverImageFile
All Implemented Interfaces:
Identifiable

public class RoverImageFile
extends java.lang.Object
implements Identifiable

A named image file, including byte contents.

This is an abstraction of an image file. It may or may not actually be loaded from a filesystem; that is up to the RoverStore implementation.

The distinction between this and RoverImage is that a RoverImage is an image placed on the map, with only a pointer to the RoverImageFile, which contains the contents.

Copyright 2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
RoverImageFile(byte[] contents)
           
RoverImageFile(java.lang.String name, int id, java.lang.String guid, byte[] contents)
           
RoverImageFile(VfsFile file)
           
 
Method Summary
 java.awt.Image createImage()
           
 byte[] getContents()
           
 java.lang.String getGuid()
          Globally-unique ID (GUID) for this object.
 int getId()
          Numeric ID for this object.
 java.lang.String getName()
          Name of this object.
 RoverImageFile withId(int id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoverImageFile

public RoverImageFile(VfsFile file)
               throws java.io.IOException
Throws:
java.io.IOException

RoverImageFile

public RoverImageFile(java.lang.String name,
                      int id,
                      java.lang.String guid,
                      byte[] contents)

RoverImageFile

public RoverImageFile(byte[] contents)
Method Detail

withId

public RoverImageFile withId(int id)

getGuid

public java.lang.String getGuid()
Description copied from interface: Identifiable
Globally-unique ID (GUID) for this object. GUIDs should be globally unique for all of a specific kind of identifiable - in fact they should generally follow the UUID design and be unique for all things in the universe. They are used for synchronization in long-transaction, multiple-machine systems. GUIDs are represented as a single String; this interface does not require a required format. GUIDs are generally too long to be very human-legible.

Specified by:
getGuid in interface Identifiable

getId

public int getId()
Description copied from interface: Identifiable
Numeric ID for this object. Numeric IDs may only be unique for a set of Identifiables in a specific context (e.g. a single computer or database). They are generally small enough to be human-legible but may be automatically generated (e.g. auto incremented).

Specified by:
getId in interface Identifiable

getName

public java.lang.String getName()
Description copied from interface: Identifiable
Name of this object. Names may not be unique for any given set of Identifiables. They are generally human-oriented.

Specified by:
getName in interface Identifiable

getContents

public byte[] getContents()

createImage

public java.awt.Image createImage()