net.jot.image.writers
Class JOTBMPImageWriter

java.lang.Object
  extended by net.jot.image.writers.JOTBMPImageWriter
All Implemented Interfaces:
JOTAbstractImageWriterInterface

public class JOTBMPImageWriter
extends java.lang.Object
implements JOTAbstractImageWriterInterface

Implementation to write an AbstractImage into a BMP format file. Note that it support 24Bits colors max, 8 bits per color (and no alpha) If alpha is present in AbstractImage, it will be ignored. (Does not support compressed BMP)

Author:
thibautc

Constructor Summary
JOTBMPImageWriter()
           
 
Method Summary
 java.lang.String getContentType()
          Return the image content type (to be sent to the browser)
 int writeToStream(JOTAbstractImage abstractImage, java.io.OutputStream out)
          Writes the abstractImage to a file according to impl.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JOTBMPImageWriter

public JOTBMPImageWriter()
Method Detail

writeToStream

public int writeToStream(JOTAbstractImage abstractImage,
                         java.io.OutputStream out)
                  throws java.lang.Exception
Description copied from interface: JOTAbstractImageWriterInterface
Writes the abstractImage to a file according to impl. format returns data length

Specified by:
writeToStream in interface JOTAbstractImageWriterInterface
Throws:
java.lang.Exception

getContentType

public java.lang.String getContentType()
Description copied from interface: JOTAbstractImageWriterInterface
Return the image content type (to be sent to the browser)

Specified by:
getContentType in interface JOTAbstractImageWriterInterface
Returns: