net.sourceforge.rtf.context.image
Class FormatBase

java.lang.Object
  extended by net.sourceforge.rtf.context.image.FormatBase

public class FormatBase
extends java.lang.Object


Constructor Summary
FormatBase()
           
 
Method Summary
 FormatBase convert(FormatBase format, byte[] data)
          Convert image data if necessary - for example when format is not supported by rtf.
static FormatBase determineFormat(byte[] data)
          Determine image file format.
 java.lang.String getRtfTag()
          Get rtf tag.
 int getType()
          Get image type.
static boolean isFormat(byte[] data)
          Determines whether the image is in the according format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatBase

public FormatBase()
Method Detail

isFormat

public static boolean isFormat(byte[] data)
Determines whether the image is in the according format.

Parameters:
data - Image
Returns:
true If according type\n false Other type

convert

public FormatBase convert(FormatBase format,
                          byte[] data)
Convert image data if necessary - for example when format is not supported by rtf.

Parameters:
data - Image
type - Format type

determineFormat

public static FormatBase determineFormat(byte[] data)
Determine image file format.

Parameters:
data - Image
Returns:
Image format class

getType

public int getType()
Get image type.

Returns:
Image format class

getRtfTag

public java.lang.String getRtfTag()
Get rtf tag.

Returns:
Rtf tag for image format.


Copyright 2007 null. All Rights Reserved.