lt.monarch.image.wbmp
Class WBMPEncoder

java.lang.Object
  extended by lt.monarch.image.AbstractEncoder
      extended by lt.monarch.image.wbmp.WBMPEncoder
All Implemented Interfaces:
java.io.Serializable

public class WBMPEncoder
extends AbstractEncoder

WBMPEncoder create a WBMP file.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.image.AbstractEncoder
image
 
Constructor Summary
Constructor and Description
WBMPEncoder()
          Empty constructor for WBMPEncoder.
 
Method Summary
Modifier and Type Method and Description
 void encode(java.awt.Image image, java.io.OutputStream outputStream)
          Encodes image to the output stream.
 java.lang.String getContentType()
          Returns content type string - 'wbmp'
 void setClearness(float clear)
          Set clearness of the picture.
 
Methods inherited from class lt.monarch.image.AbstractEncoder
readObject, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBMPEncoder

public WBMPEncoder()
Empty constructor for WBMPEncoder.

Method Detail

getContentType

public java.lang.String getContentType()
Returns content type string - 'wbmp'

Specified by:
getContentType in class AbstractEncoder
Returns:
content type string

encode

public void encode(java.awt.Image image,
                   java.io.OutputStream outputStream)
            throws java.io.IOException,
                   java.lang.InterruptedException
Encodes image to the output stream.

Specified by:
encode in class AbstractEncoder
Parameters:
image - image which must be encoded into WBMP format.
outputStream - WBMP encoded image output stream.
Throws:
java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
java.lang.InterruptedException

setClearness

public void setClearness(float clear)
Set clearness of the picture. If clearness is 0 then chart is white and if clearness is 1 then chart is black.

Parameters:
clear - clear from 0 to 1.