2.17.2: 2011-06-17

net.sf.basedb.core
Class SpotImage

java.lang.Object
  extended by net.sf.basedb.core.SpotImage

public class SpotImage
extends Object

Holds the image information about a single spot image in PNG format.

Version:
2.0
Author:
Samuel, Nicklas
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Field Summary
private  byte[] image
           
 
Constructor Summary
SpotImage(byte[] image)
          Constructor that takes the image as a byte array.
 
Method Summary
 int getBytes()
          Get the number of bytes of the image.
 byte[] getImage()
          Get the image as an array of bytes.
 InputStream getInputStream()
          Get an InputStream of the image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

private final byte[] image
Constructor Detail

SpotImage

SpotImage(byte[] image)
Constructor that takes the image as a byte array.

Parameters:
image - Byte array of a PNG image
Method Detail

getInputStream

public InputStream getInputStream()
Get an InputStream of the image.

Returns:
An InputStream

getImage

public byte[] getImage()
Get the image as an array of bytes. The returned array is a copy of the original image.

Returns:
An array of bytes representing the image in PNG format

getBytes

public int getBytes()
Get the number of bytes of the image.


2.17.2: 2011-06-17